diff --git a/.gitattributes b/.gitattributes index 4bf2ed7..1e28c29 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1 @@ -*.ftl eol=lf -test/fixtures/crlf.ftl eol=crlf -test/fixtures/cr.ftl eol=cr +**.ftl eol=lf diff --git a/.gitignore b/.gitignore index dd87e2d..71903f8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules build +/format/**/*.js diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..ac8d76d --- /dev/null +++ b/.prettierrc @@ -0,0 +1,6 @@ +{ + "bracketSpacing": false, + "trailingComma": "es5", + "printWidth": 100, + "tabWidth": 4 +} diff --git a/.travis.yml b/.travis.yml index a942ff2..f2e1c16 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,11 @@ sudo: false language: node_js +before_script: npm run build:impls script: npm run ci -node_js: 9 +node_js: + - "8" + - "10" + - "12" cache: directories: node_modules notifications: diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..55919f6 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,19 @@ +{ + "editor.formatOnSave": false, + "[javascript]": { + "editor.formatOnSave": false + }, + "[json]": { + "editor.formatOnSave": true + }, + "[typescript]": { + "editor.formatOnSave": true, + "editor.codeActionsOnSave": { + "source.organizeImports": true + } + }, + "files.exclude": { + "node_modules/": true, + "format/**/*.js": true + } +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..30abe81 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,13 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "type": "npm", + "script": "watch", + "problemMatcher": [ + "$tsc-watch" + ], + "isBackground": true + } + ] +} diff --git a/README.md b/README.md index 15d3380..18e8b06 100644 --- a/README.md +++ b/README.md @@ -6,36 +6,56 @@ the natural language. This repository contains the specification, the reference implementation of the parser and the documentation for Fluent. -## Fluent Syntax (FTL) +## Fluent Syntax FTL is the syntax for describing translation resources in Project Fluent. FTL stands for *Fluent Translation List*. Read the [Fluent Syntax Guide][] to get started learning Fluent. -The `syntax/` directory contains the reference implementation of the syntax as -a _LL(infinity)_ parser. +The `syntax/spec` directory contains the formal EBNF grammar, autogenerated +from the reference implementation. + +The `syntax/parser` directory contains the reference implementation of the +syntax as a _LL(infinity)_ parser. + +## Fluent Format + +The `format/spec` directory contains the specification of formatting patterns +into strings, including resolving all expressions in placeables. + +The `format/resolver` directory contains the reference implementation of +`Bundle.formatPattern` and the resolver. -The `spec/` directory contains the formal EBNF grammar, autogenerated from the -reference implementation. ## Development -While working on the reference parser, use the following commands to test and -validate your work: +The reference resolver is written in TypeScript and must be compiled before +tests are run. The reference parser is currently still written in JavaScript. + +While working on the reference implementations, use the following commands to +test and validate your work: + + npm run watch # Run the TypeScript compiler watcher. + npm test # Test the parser against JSON AST fixtures, + # and test the resolver using the examples + # from the spec (the resolver must be compiled). - npm test # Test the parser against JSON AST fixtures. - npm run lint # Lint the parser code. + npm run lint # Lint the parser and the resolver code. + npm run pretty # Prettify the resolver code. npm run generate:ebnf # Generate the EBNF from syntax/grammar.js. npm run generate:fixtures # Generate test fixtures (FTL → JSON AST). + npm run build:impls # Compile the resolver. npm run build:guide # Build the HTML version of the Guide. npm run bench # Run the performance benchmark on large FTL. ## Other Implementations -This repository contains the reference implementation of the parser. Other implementations exist which should be preferred for use in production and in tooling. +This repository contains the reference implementation of Fluent. Other +implementations exist which should be preferred for use in production and in +tooling. - The JavaScript implementation at [`fluent.js`](https://github.com/projectfluent/fluent.js), including the [React bindings](https://github.com/projectfluent/fluent.js/tree/master/fluent-react). - The Python implementation at [`python-fluent`](https://github.com/projectfluent/python-fluent). @@ -49,8 +69,9 @@ We also know about the following community-driven implementations: ## Learn More and Discuss -Find out more about Project Fluent at [projectfluent.org][] and discuss the future of Fluent at [Mozilla Discourse][]. +Find out more about Project Fluent at [projectfluent.org][] and discuss the +future of Fluent at [Mozilla Discourse][]. -[Fluent Syntax Guide]: http://projectfluent.org/fluent/guide -[projectfluent.org]: http://projectfluent.org +[Fluent Syntax Guide]: https://projectfluent.org/fluent/guide +[projectfluent.org]: https://projectfluent.org [Mozilla Discourse]: https://discourse.mozilla.org/c/fluent diff --git a/format/lib/input.ts b/format/lib/input.ts new file mode 100644 index 0000000..d2dcaed --- /dev/null +++ b/format/lib/input.ts @@ -0,0 +1,36 @@ +import fs from "fs"; +import path from "path"; +import readline from "readline"; + +export function fromStdin(callback: (value: string) => void) { + const rl = readline.createInterface({ + input: process.stdin, + output: process.stdout, + prompt: "fluent>", + }); + + let lines: Array = []; + + rl.on("line", line => lines.push(line)); + rl.on("close", () => callback(lines.join("\n") + "\n")); +} + +export function fromFile(filePath: string) { + return fs.readFileSync(filePath, "utf8"); +} + +export function* files(destination: string, ext: string) { + let files; + if (destination.endsWith(ext)) { + files = [destination]; + } else { + files = fs + .readdirSync(destination) + .filter(filename => filename.endsWith(ext)) + .map(filename => path.join(destination, filename)); + } + + for (let file of files) { + yield file; + } +} diff --git a/format/lib/tools.ts b/format/lib/tools.ts new file mode 100644 index 0000000..77022f1 --- /dev/null +++ b/format/lib/tools.ts @@ -0,0 +1,42 @@ +import {Bundle} from "../resolver/bundle.js"; +import {ErrorKind} from "../resolver/error.js"; +import {Resource} from "../resolver/resource.js"; +import {Value} from "../resolver/value.js"; + +type Variables = Map; + +export function formatResource(resource: Resource, variables: Variables) { + let bundle = new Bundle(); + bundle.addResource(resource); + + let results = []; + for (let entry of resource.body) { + if (entry.type !== "Message") { + continue; + } + let message = bundle.getMessage(entry.id.name); + if (message) { + if (message.value) { + let {value, errors} = bundle.formatPattern(message.value, variables); + results.push({ + value, + errors: errors.map(error => ({ + kind: ErrorKind[error.kind], + arg: error.arg, + })), + }); + } + } + } + return results; +} + +export function formatMessage(resource: Resource, variables: Variables, id: string) { + let bundle = new Bundle(); + bundle.addResource(resource); + + let message = bundle.getMessage(id); + if (message && message.value) { + return bundle.formatPattern(message.value, variables); + } +} diff --git a/format/lib/types.d.ts b/format/lib/types.d.ts new file mode 100644 index 0000000..cdac4e9 --- /dev/null +++ b/format/lib/types.d.ts @@ -0,0 +1,3 @@ +declare module "json-diff" { + export function diffString(actual: string, expected: string): string; +} diff --git a/format/lib/validate.ts b/format/lib/validate.ts new file mode 100644 index 0000000..c62febe --- /dev/null +++ b/format/lib/validate.ts @@ -0,0 +1,35 @@ +import {deepStrictEqual} from "assert"; +import commonmark from "commonmark"; +import jsonDiff from "json-diff"; + +type formatFn = (stdin: string) => string; + +export function validate(fn: formatFn, spec: string, source: string) { + // https://github.com/commonmark/commonmark.js/blob/master/README.md#usage + let reader = new commonmark.Parser(); + let parsed = reader.parse(source); + let walker = parsed.walker(); + + let counter = 1; + let actual = null; + let current; + while ((current = walker.next())) { + let {entering, node} = current; + if (entering && node.type === "code_block" && node.literal !== null) { + if (node.info === "properties") { + actual = fn(node.literal); + } else if (node.info === "json" && actual) { + let expected = node.literal; + + try { + deepStrictEqual(JSON.parse(actual), JSON.parse(expected)); + console.log(`${spec} Example ${counter++} PASS`); + } catch (err) { + console.log(`${spec} Example ${counter++} FAIL`); + console.log(jsonDiff.diffString(err.actual, err.expected)); + } + actual = null; + } + } + } +} diff --git a/format/resolver/bundle.ts b/format/resolver/bundle.ts new file mode 100644 index 0000000..e843a7a --- /dev/null +++ b/format/resolver/bundle.ts @@ -0,0 +1,45 @@ +import {Pattern} from "../../syntax/parser/ast.js"; +import {ScopeError} from "./error.js"; +import {Message} from "./message.js"; +import {Resource} from "./resource.js"; +import {Scope} from "./scope.js"; +import {Value} from "./value.js"; + +export interface FormatResult { + readonly value: string; + readonly errors: Array; +} + +export class Bundle { + public readonly messages: Map = new Map(); + + addResource(resource: Resource) { + for (let message of resource.body) { + if (message.type === "Message") { + let attributes: Record = {}; + for (let attribute of message.attributes) { + attributes[attribute.id.name] = attribute.value; + } + this.messages.set(message.id.name, { + id: message.id.name, + value: message.value, + attributes, + }); + } + } + } + + hasMessage(id: string) { + return this.messages.has(id); + } + + getMessage(id: string) { + return this.messages.get(id); + } + + formatPattern(pattern: Pattern, variables: Map): FormatResult { + let scope = new Scope(this.messages, variables); + let value = scope.resolvePattern(pattern).format(scope); + return {value, errors: scope.errors}; + } +} diff --git a/format/resolver/error.ts b/format/resolver/error.ts new file mode 100644 index 0000000..7d5add7 --- /dev/null +++ b/format/resolver/error.ts @@ -0,0 +1,15 @@ +export enum ErrorKind { + UnknownMessage, + MissingValue, +} + +export class ScopeError extends Error { + public kind: ErrorKind; + public arg: string; + + constructor(kind: ErrorKind, arg: string) { + super(); + this.kind = kind; + this.arg = arg; + } +} diff --git a/format/resolver/message.ts b/format/resolver/message.ts new file mode 100644 index 0000000..cc628a8 --- /dev/null +++ b/format/resolver/message.ts @@ -0,0 +1,7 @@ +import {Pattern} from "../../syntax/parser/ast.js"; + +export interface Message { + readonly id: string; + readonly value: Pattern | null; + readonly attributes: Record; +} diff --git a/format/resolver/resource.ts b/format/resolver/resource.ts new file mode 100644 index 0000000..1908694 --- /dev/null +++ b/format/resolver/resource.ts @@ -0,0 +1,19 @@ +import {Entry} from "../../syntax/parser/ast.js"; +import {Resource as ResourceParser} from "../../syntax/parser/grammar.js"; + +export class Resource { + public readonly body: Array; + + constructor(source: string) { + this.body = this.parse(source).body; + } + + private parse(source: string) { + return ResourceParser.run(source).fold( + resource => resource, + err => { + throw err; + } + ); + } +} diff --git a/format/resolver/scope.ts b/format/resolver/scope.ts new file mode 100644 index 0000000..1e86ff7 --- /dev/null +++ b/format/resolver/scope.ts @@ -0,0 +1,59 @@ +import * as ast from "../../syntax/parser/ast.js"; +import {ErrorKind, ScopeError} from "./error.js"; +import {Message} from "./message.js"; +import {NoneValue, StringValue, Value} from "./value.js"; + +export class Scope { + private readonly messages: Map; + public errors: Array; + + constructor(messages: Map, variables: Map) { + this.messages = messages; + this.errors = []; + } + + resolveExpression(node: ast.Expression): Value { + switch (node.type) { + case "StringLiteral": + return this.resolveStringLiteral(node); + case "MessageReference": + return this.resolveMessageReference(node); + default: + throw new TypeError("Unknown node type."); + } + } + + resolveStringLiteral(node: ast.StringLiteral): Value { + let {value} = node.parse(); + return new StringValue(value); + } + + resolveMessageReference(node: ast.MessageReference): Value { + let message = this.messages.get(node.id.name); + if (message == undefined) { + this.errors.push(new ScopeError(ErrorKind.UnknownMessage, node.id.name)); + return new NoneValue(`${node.id.name}`); + } else if (message.value) { + return this.resolvePattern(message.value); + } else { + this.errors.push(new ScopeError(ErrorKind.MissingValue, node.id.name)); + return new NoneValue(`${node.id.name}`); + } + } + + resolvePatternElement(node: ast.PatternElement): Value { + switch (node.type) { + case "TextElement": + return new StringValue(node.value); + case "Placeable": + return this.resolveExpression(node.expression); + default: + throw new TypeError("Unknown node type."); + } + } + + resolvePattern(node: ast.Pattern): Value { + let parts = node.elements.map(element => this.resolvePatternElement(element).format(this)); + return new StringValue(parts.join("")); + } +} diff --git a/format/resolver/value.ts b/format/resolver/value.ts new file mode 100644 index 0000000..d615a68 --- /dev/null +++ b/format/resolver/value.ts @@ -0,0 +1,42 @@ +import {Scope} from "./scope.js"; + +export interface Value { + readonly value: unknown; + format(scope: Scope): string; +} + +export class NoneValue implements Value { + readonly value: string; + + constructor(value: string = "???") { + this.value = value; + } + + format(scope: Scope) { + return `{${this.value}}`; + } +} + +export class StringValue implements Value { + readonly value: string; + + constructor(value: string) { + this.value = value; + } + + format(scope: Scope) { + return this.value; + } +} + +export class NumberValue implements Value { + readonly value: number; + + constructor(value: number) { + this.value = value; + } + + format(scope: Scope) { + return this.value.toString(10); + } +} diff --git a/format/spec/string_literal.md b/format/spec/string_literal.md new file mode 100644 index 0000000..09b2469 --- /dev/null +++ b/format/spec/string_literal.md @@ -0,0 +1,167 @@ +# StringLiteral + +`StringLiterals` can be interpolated as `Placeables` inside `Patterns`. They +format to their text content. + +```properties +test = {"Text"} +``` +```json +{ + "value": "Text", + "errors": [] +} +``` + +All whitespace is preserved in `StringLiterals`. + +```properties +test = A {" "} B +``` +```json +{ + "value": "A B", + "errors": [] +} +``` + +When positioned at the front or at the end of a `Pattern`, `StringLiterals` +can be used to preserve leading and trailing whitespace which would be +otherwise trimmed inside `TextElement`. + +```properties +test = {" "}Text +``` +```json +{ + "value": " Text", + "errors": [] +} +``` + +```properties +test = Text{" "} +``` +```json +{ + "value": "Text ", + "errors": [] +} +``` + +Curly braces, `LEFT CURLY BRACKET` (U+007B) and `RIGHT CURLY BRACKET` (U+007D), have no special meaning inside `StringLiterals`. + +```properties +test = {"{braces}"} +``` +```json +{ + "value": "{braces}", + "errors": [] +} +``` + + +## Special Character Escape Sequences + +Two characters are considered special in `StringLiterals` due to their +significance in the Fluent grammar. + +- The double quote, `QUOTATION MARK` (U+0022), denotes the end of the +`StringLiteral`. + +- The backslash, `REVERSE SOLIDUS` (U+005C), denotes the start of a known +escape sequence. + +The double quote can be escaped by prefixing it with a backslash. + +```properties +test = {"\""} +``` +```json +{ + "value": "\"", + "errors": [] +} +``` + +The backslash itself can be escape by prefixing it with another backslash. + +```properties +test = {"\\"} +``` +```json +{ + "value": "\\", + "errors": [] +} +``` + +## Unicode Escape Sequences + +Characters from the Basic Multilingual Plane (BMP) can be escaped using the +four-hexdigits escape sequences, starting with `\u`. + +```properties +test = {"\u0041"} +``` +```json +{ + "value": "A", + "errors": [] +} +``` + +Astral characters can be escaped using the six-hexdigit escape sequences, +starting with `\U`. + +```properties +test = {"\U01F602"} +``` +```json +{ + "value": "😂", + "errors": [] +} +``` + +An extra backslash can be used to escape the Unicode escape sequence and +produce a literal sequence of characters representing the Unicode escape +sequence. + +```properties +test = {"\\U01F602"} +``` +```json +{ + "value": "\\U01F602", + "errors": [] +} +``` + +## Unknown Escape Sequences + +Escape sequences which do not adhere to the rules above are considered +unknown and do not result in any special behavior. No errors are produced. +Unknown escape sequences are considered valid textual content of +`StringLiterals`. + +```properties +test = {"\a"} +``` +```json +{ + "value": "\\a", + "errors": [] +} +``` + +```properties +test = {"\uXXXX"} +``` +```json +{ + "value": "\uXXXX", + "errors": [] +} +``` diff --git a/format/spec/text_element.md b/format/spec/text_element.md new file mode 100644 index 0000000..d1e0148 --- /dev/null +++ b/format/spec/text_element.md @@ -0,0 +1,47 @@ +# TextElement + +Patterns are composed of `PatternElements`, which can be `TextElements` or +`Placeables`. `TextElements` represent the verbatim content of the +translation. + +```properties +test = Text +``` + +```json +{ + "value": "Text", + "errors": [] +} +``` + +Multiline `TextElements` must be formatted without changes to newlines and +whitespace. + +```properties +test = + Multiline + Content +``` + +```json +{ + "value": "Multiline\n Content", + "errors": [] +} +``` + +## Escape Sequences + +Escape sequences are not supported in `TextElements`. + +```properties +test = \U01F602 +``` + +```json +{ + "value": "\\U01F602", + "errors": [] +} +``` diff --git a/format/test/resolver.ts b/format/test/resolver.ts new file mode 100644 index 0000000..7ac6be2 --- /dev/null +++ b/format/test/resolver.ts @@ -0,0 +1,22 @@ +import {files, fromFile} from "../lib/input.js"; +import {formatMessage} from "../lib/tools.js"; +import {validate} from "../lib/validate.js"; +import {Resource} from "../resolver/resource.js"; + +const specs = process.argv[2]; + +if (!specs) { + console.error("Usage: node resolver.js SPEC"); + process.exit(1); +} + +for (let file of files(specs, ".md")) { + let source = fromFile(file); + validate(format, file, source); +} + +function format(input: string) { + let resource = new Resource(input); + let result = formatMessage(resource, new Map(), "test"); + return JSON.stringify(result, null, 4); +} diff --git a/format/tools/format.ts b/format/tools/format.ts new file mode 100644 index 0000000..c10bf58 --- /dev/null +++ b/format/tools/format.ts @@ -0,0 +1,58 @@ +import parseArgs from "minimist"; +import {fromFile, fromStdin} from "../lib/input.js"; +import {formatMessage, formatResource} from "../lib/tools.js"; +import {Resource} from "../resolver/resource.js"; + +const argv = parseArgs(process.argv.slice(2), { + boolean: ["help"], + string: ["message"], + alias: { + help: "h", + message: "m", + }, +}); + +if (argv.help) { + exitHelp(0); +} + +const [filePath] = argv._; + +if (filePath === "-") { + fromStdin(print); +} else if (filePath) { + let source = fromFile(filePath); + print(source); +} else { + exitHelp(1); +} + +function exitHelp(exitCode: number) { + console.log(` + Usage: node format.js [OPTIONS] + + When FILE is "-", read text from stdin. + + Examples: + + node format.js path/to/file.ftl + cat path/to/file.ftl | node format.js - + + Options: + + -h, --help Display help and quit. + -m, --message ID Format only the message called ID. +`); + process.exit(exitCode); +} + +function print(source: string) { + let resource = new Resource(source); + let results; + if (argv.message) { + results = formatMessage(resource, new Map(), argv.message); + } else { + results = formatResource(resource, new Map()); + } + console.log(JSON.stringify(results, null, 4)); +} diff --git a/format/tools/validate.ts b/format/tools/validate.ts new file mode 100644 index 0000000..e96bf29 --- /dev/null +++ b/format/tools/validate.ts @@ -0,0 +1,45 @@ +import {execSync} from "child_process"; +import parseArgs from "minimist"; +import {files, fromFile} from "../lib/input.js"; +import {validate} from "../lib/validate.js"; + +const argv = parseArgs(process.argv.slice(2), { + boolean: ["help"], + alias: { + help: "h", + }, +}); + +let [exePath, mdPath] = argv._; +if (exePath && mdPath) { + for (let file of files(mdPath, ".md")) { + let source = fromFile(file); + validate(format, file, source); + } +} else if (argv.help) { + exitHelp(0); +} else { + exitHelp(1); +} + +function format(input: string) { + return execSync(exePath, { + input, + encoding: "utf8", + }); +} + +function exitHelp(exitCode: number) { + console.log(` + Usage: node validate.js + + Examples: + + node validate.js build/bin/format.js spec/format/text_element.md + + Options: + + -h, --help Display help and quit. +`); + process.exit(exitCode); +} diff --git a/format/tsconfig.json b/format/tsconfig.json new file mode 100644 index 0000000..fb1f7b2 --- /dev/null +++ b/format/tsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "target": "es2019", + "module": "es2015", + "strict": true, + "esModuleInterop": true + } +} diff --git a/package-lock.json b/package-lock.json index 9769d6c..9e57dab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,52 +4,88 @@ "lockfileVersion": 1, "requires": true, "dependencies": { - "acorn": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", - "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==", - "dev": true + "@babel/code-frame": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", + "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "dev": true, + "requires": { + "@babel/highlight": "^7.0.0" + } }, - "acorn-jsx": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", - "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "@babel/highlight": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", + "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", "dev": true, "requires": { - "acorn": "^3.0.4" - }, - "dependencies": { - "acorn": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", - "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", - "dev": true - } + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" } }, + "@fluent/bundle": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@fluent/bundle/-/bundle-0.14.0.tgz", + "integrity": "sha512-ENcZYWq6Q5ut39n3hSQiL3seCTAajuPXIkpnPBeO4xcJFTUebNhKh5VpmwJngoS5lkRVYOzJGmupADzQy/ODYw==", + "dev": true + }, + "@fluent/syntax": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@fluent/syntax/-/syntax-0.14.0.tgz", + "integrity": "sha512-E+1yHdSo/4PTS6bCbj5J+kzEpucf3eJ0U5mLk7VtnUiMvlPHSbmEL68GLCL9QNTOP3laxZtCHCYDD0Ci/2n97w==", + "dev": true + }, + "@types/commonmark": { + "version": "0.27.4", + "resolved": "https://registry.npmjs.org/@types/commonmark/-/commonmark-0.27.4.tgz", + "integrity": "sha512-7koSjp08QxKoS1/+3T15+kD7+vqOUvZRHvM8PutF3Xsk5aAEkdlIGRsHJ3/XsC3izoqTwBdRW/vH7rzCKkIicA==", + "dev": true + }, + "@types/minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=", + "dev": true + }, + "@types/node": { + "version": "12.12.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.17.tgz", + "integrity": "sha512-Is+l3mcHvs47sKy+afn2O1rV4ldZFU7W8101cNlOd+MRbjM4Onida8jSZnJdTe/0Pcf25g9BNIUsuugmE6puHA==", + "dev": true + }, + "acorn": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz", + "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==", + "dev": true + }, + "acorn-jsx": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.1.0.tgz", + "integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==", + "dev": true + }, "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "version": "6.10.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", + "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", "dev": true, "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", + "fast-deep-equal": "^2.0.1", "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" } }, - "ajv-keywords": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", - "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=", - "dev": true - }, "ansi-escapes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", - "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", - "dev": true + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.0.tgz", + "integrity": "sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } }, "ansi-regex": { "version": "2.1.1", @@ -58,10 +94,13 @@ "dev": true }, "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } }, "argparse": { "version": "1.0.10", @@ -87,54 +126,19 @@ "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", "dev": true }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", "dev": true }, "async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", - "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", "dev": true, "requires": { - "lodash": "^4.14.0" - } - }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - }, - "dependencies": { - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } + "lodash": "^4.17.14" } }, "babylon": { @@ -149,12 +153,6 @@ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, - "base64url": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/base64url/-/base64url-2.0.0.tgz", - "integrity": "sha1-6sFuA+oUOO/5Qj1puqNiYu0fcLs=", - "dev": true - }, "bash-color": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/bash-color/-/bash-color-0.0.4.tgz", @@ -171,91 +169,50 @@ "concat-map": "0.0.1" } }, - "buffer-from": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.0.0.tgz", - "integrity": "sha512-83apNb8KK0Se60UE1+4Ukbe3HbfELJ6UlI4ldtOGs7So4KD26orJM8hIY9lxdzP+UpItH1Yh/Y8GUvNFWFFRxA==", - "dev": true - }, - "caller-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", - "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", - "dev": true, - "requires": { - "callsites": "^0.2.0" - } - }, "callsites": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", - "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } } }, "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", - "dev": true - }, - "circular-json": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", - "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", "dev": true }, "cli-color": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-1.2.0.tgz", - "integrity": "sha1-OlrnT9drYmevZm5p4q+70B3vNNE=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.0.tgz", + "integrity": "sha512-a0VZ8LeraW0jTuCkuAGMNufareGHhyZU9z8OGsW0gXd1hZGi1SRuNRXdbGkraBBKnhyUhyebFWnRbp+dIn0f0A==", "dev": true, "requires": { "ansi-regex": "^2.1.1", - "d": "1", - "es5-ext": "^0.10.12", - "es6-iterator": "2", - "memoizee": "^0.4.3", - "timers-ext": "0.1" + "d": "^1.0.1", + "es5-ext": "^0.10.51", + "es6-iterator": "^2.0.3", + "memoizee": "^0.4.14", + "timers-ext": "^0.1.7" } }, "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", "dev": true, "requires": { - "restore-cursor": "^2.0.0" + "restore-cursor": "^3.1.0" } }, "cli-width": { @@ -264,19 +221,13 @@ "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", "dev": true }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true - }, "color-convert": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", - "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "requires": { - "color-name": "^1.1.1" + "color-name": "1.1.3" } }, "color-name": { @@ -286,62 +237,67 @@ "dev": true }, "commander": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", - "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "commonmark": { + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/commonmark/-/commonmark-0.29.0.tgz", + "integrity": "sha512-Wc3kvAIm0EK85pHsM95Fev31wEN6/zQpwd2qcLDL8psjHRoUFvUeGHevIJAdToWUuFoX8WI/gmeDauqy32xgJQ==", "dev": true, "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" + "entities": "~ 1.1.1", + "mdurl": "~ 1.0.1", + "minimist": "~ 1.2.0", + "string.prototype.repeat": "^0.2.0" } }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { - "lru-cache": "^4.0.1", + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", "shebang-command": "^1.2.0", "which": "^1.2.9" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } } }, "d": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", - "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", "dev": true, "requires": { - "es5-ext": "^0.10.9" + "es5-ext": "^0.10.50", + "type": "^1.0.1" } }, "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } }, "deep-is": { @@ -350,21 +306,6 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, - "del": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", - "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", - "dev": true, - "requires": { - "globby": "^5.0.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "rimraf": "^2.2.8" - } - }, "difflib": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/difflib/-/difflib-0.2.4.tgz", @@ -375,9 +316,9 @@ } }, "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, "requires": { "esutils": "^2.0.2" @@ -392,15 +333,33 @@ "wordwrap": ">=0.0.2" } }, + "email-addresses": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/email-addresses/-/email-addresses-3.1.0.tgz", + "integrity": "sha512-k0/r7GrWVL32kZlGwfPNgB2Y/mMXVTq/decgLczm/j34whdaspNrZO8CnXPf1laaHxI6ptUlsnAxN+UAPw+fzg==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "entities": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", + "dev": true + }, "es5-ext": { - "version": "0.10.42", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.42.tgz", - "integrity": "sha512-AJxO1rmPe1bDEfSR6TJ/FgMFYuTBhR5R57KW58iCkYACMyFbrkqVyzXSurYoScDGvgyMpk7uRF/lPUPPTmsRSA==", + "version": "0.10.53", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", + "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", "dev": true, "requires": { "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.1", - "next-tick": "1" + "es6-symbol": "~3.1.3", + "next-tick": "~1.0.0" } }, "es6-iterator": { @@ -415,24 +374,24 @@ } }, "es6-symbol": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", - "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", "dev": true, "requires": { - "d": "1", - "es5-ext": "~0.10.14" + "d": "^1.0.1", + "ext": "^1.1.2" } }, "es6-weak-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", - "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", "dev": true, "requires": { "d": "1", - "es5-ext": "^0.10.14", - "es6-iterator": "^2.0.1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", "es6-symbol": "^3.1.1" } }, @@ -443,86 +402,98 @@ "dev": true }, "eslint": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.19.1.tgz", - "integrity": "sha512-bT3/1x1EbZB7phzYu7vCr1v3ONuzDtX8WjuM9c0iYxe+cq+pwcKEoQjl7zd3RpC6YOLgnSy3cTN58M2jcoPDIQ==", + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.7.2.tgz", + "integrity": "sha512-qMlSWJaCSxDFr8fBPvJM9kJwbazrhNcBU3+DszDW1OlEwKBBRWsJc7NJFelvwQpanHCR14cOLD41x8Eqvo3Nng==", "dev": true, "requires": { - "ajv": "^5.3.0", - "babel-code-frame": "^6.22.0", + "@babel/code-frame": "^7.0.0", + "ajv": "^6.10.0", "chalk": "^2.1.0", - "concat-stream": "^1.6.0", - "cross-spawn": "^5.1.0", - "debug": "^3.1.0", - "doctrine": "^2.1.0", - "eslint-scope": "^3.7.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^3.5.4", - "esquery": "^1.0.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^1.4.3", + "eslint-visitor-keys": "^1.1.0", + "espree": "^6.1.2", + "esquery": "^1.0.1", "esutils": "^2.0.2", - "file-entry-cache": "^2.0.0", + "file-entry-cache": "^5.0.1", "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.0.1", - "ignore": "^3.3.3", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", - "inquirer": "^3.0.6", - "is-resolvable": "^1.0.0", - "js-yaml": "^3.9.1", + "inquirer": "^7.0.0", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.3.0", - "lodash": "^4.17.4", - "minimatch": "^3.0.2", + "lodash": "^4.17.14", + "minimatch": "^3.0.4", "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "pluralize": "^7.0.0", + "optionator": "^0.8.3", "progress": "^2.0.0", - "regexpp": "^1.0.1", - "require-uncached": "^1.0.3", - "semver": "^5.3.0", - "strip-ansi": "^4.0.0", - "strip-json-comments": "~2.0.1", - "table": "4.0.2", - "text-table": "~0.2.0" + "regexpp": "^2.0.1", + "semver": "^6.1.2", + "strip-ansi": "^5.2.0", + "strip-json-comments": "^3.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", + "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", "dev": true, "requires": { "esrecurse": "^4.1.0", "estraverse": "^4.1.1" } }, + "eslint-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, "eslint-visitor-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", + "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", "dev": true }, - "esm": { - "version": "3.2.25", - "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", - "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==" - }, "espree": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", - "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.2.tgz", + "integrity": "sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA==", "dev": true, "requires": { - "acorn": "^5.5.0", - "acorn-jsx": "^3.0.0" + "acorn": "^7.1.0", + "acorn-jsx": "^5.1.0", + "eslint-visitor-keys": "^1.1.0" } }, "esprima": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", - "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, "esquery": { @@ -544,15 +515,15 @@ } }, "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true }, "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, "event-emitter": { @@ -565,21 +536,49 @@ "es5-ext": "~0.10.14" } }, + "ext": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", + "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", + "dev": true, + "requires": { + "type": "^2.0.0" + }, + "dependencies": { + "type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.0.0.tgz", + "integrity": "sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow==", + "dev": true + } + } + }, "external-editor": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", - "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", "dev": true, "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", "tmp": "^0.0.33" + }, + "dependencies": { + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + } } }, "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", "dev": true }, "fast-json-stable-stringify": { @@ -595,52 +594,71 @@ "dev": true }, "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.1.0.tgz", + "integrity": "sha512-ravh8VRXqHuMvZt/d8GblBeqDMkdJMBdv/2KntFH+ra5MXkO7nxNKpzQ3n6QD/2da1kH0aWmNISdvhM7gl2gVg==", "dev": true, "requires": { "escape-string-regexp": "^1.0.5" } }, "file-entry-cache": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", - "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", "dev": true, "requires": { - "flat-cache": "^1.2.1", - "object-assign": "^4.0.1" + "flat-cache": "^2.0.1" } }, - "flat-cache": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", - "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", + "filename-reserved-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-1.0.0.tgz", + "integrity": "sha1-5hz4BfDeHJhFZ9A4bcXfUO5a9+Q=", + "dev": true + }, + "filenamify": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-1.2.1.tgz", + "integrity": "sha1-qfL/0RxQO+0wABUCknI3jx8TZaU=", "dev": true, "requires": { - "circular-json": "^0.3.1", - "del": "^2.0.2", - "graceful-fs": "^4.1.2", - "write": "^0.2.1" + "filename-reserved-regex": "^1.0.0", + "strip-outer": "^1.0.0", + "trim-repeated": "^1.0.0" } }, - "fluent": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/fluent/-/fluent-0.6.4.tgz", - "integrity": "sha512-EXfMJmnGbUgaIC1myIzDk5akAF6+1JrI7KVnNCba2ou7WCKc/2CWa8QshfhImVtettOvEs0z0UVdMrS6zX7pxA==", - "dev": true + "filenamify-url": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/filenamify-url/-/filenamify-url-1.0.0.tgz", + "integrity": "sha1-syvYExnvWGO3MHi+1Q9GpPeXX1A=", + "dev": true, + "requires": { + "filenamify": "^1.0.0", + "humanize-url": "^1.0.0" + } }, - "fluent-syntax": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/fluent-syntax/-/fluent-syntax-0.7.0.tgz", - "integrity": "sha512-T0iqfhC40jrs3aDjYOKgzIQjjhsH2Fa6LnXB6naPv0ymW3DeYMUFa89y9aLKMpi1P9nl2vEimK7blx4tVnUWBg==", + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "flatted": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", + "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", "dev": true }, "fs-extra": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", "dev": true, "requires": { "graceful-fs": "^4.1.2", @@ -661,33 +679,19 @@ "dev": true }, "gh-pages": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/gh-pages/-/gh-pages-1.1.0.tgz", - "integrity": "sha512-ZpDkeOVmIrN5mz+sBWDz5zmTqcbNJzI/updCwEv/7rrSdpTNlj1B5GhBqG7f4Q8p5sJOdnBV0SIqxJrxtZQ9FA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/gh-pages/-/gh-pages-2.1.1.tgz", + "integrity": "sha512-yNW2SFp9xGRP/8Sk2WXuLI/Gn92oOL4HBgudn6PsqAnuWT90Y1tozJoTfX1WdrDSW5Rb90kLVOf5mm9KJ/2fDw==", "dev": true, "requires": { - "async": "2.6.0", - "base64url": "^2.0.0", - "commander": "2.11.0", - "fs-extra": "^4.0.2", + "async": "^2.6.1", + "commander": "^2.18.0", + "email-addresses": "^3.0.1", + "filenamify-url": "^1.0.0", + "fs-extra": "^7.0.0", "globby": "^6.1.0", - "graceful-fs": "4.1.11", + "graceful-fs": "^4.1.11", "rimraf": "^2.6.2" - }, - "dependencies": { - "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - } } }, "gitbook-cli": { @@ -709,6 +713,12 @@ "user-home": "2.0.0" }, "dependencies": { + "commander": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", + "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", + "dev": true + }, "fs-extra": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-3.0.1.tgz", @@ -734,28 +744,13 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=", "dev": true - }, - "semver": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", - "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", - "dev": true - }, - "tmp": { - "version": "0.0.31", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.31.tgz", - "integrity": "sha1-jzirlDjhcxXl29izZX6L+yd65Kc=", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.1" - } } } }, "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -766,20 +761,31 @@ "path-is-absolute": "^1.0.0" } }, + "glob-parent": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", + "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, "globals": { - "version": "11.5.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.5.0.tgz", - "integrity": "sha512-hYyf+kI8dm3nORsiiXUQigOU62hDLfJ9G01uyGMxhc6BKsircrUhC4uJPQPUSuq2GrTmiiEt7ewxlMdBewfmKQ==", - "dev": true + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.3.0.tgz", + "integrity": "sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } }, "globby": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", - "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", "dev": true, "requires": { "array-union": "^1.0.1", - "arrify": "^1.0.0", "glob": "^7.0.3", "object-assign": "^4.0.1", "pify": "^2.0.0", @@ -792,15 +798,6 @@ "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", "dev": true }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -813,21 +810,41 @@ "integrity": "sha1-CH4fELBGky/IWU3Z5tN4r8nR5aw=", "dev": true }, + "humanize-url": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/humanize-url/-/humanize-url-1.0.1.tgz", + "integrity": "sha1-9KuZ4NKIF0yk4eUEB8VfuuRk7/8=", + "dev": true, + "requires": { + "normalize-url": "^1.0.0", + "strip-url-auth": "^1.0.0" + } + }, "iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" } }, "ignore": { - "version": "3.3.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.8.tgz", - "integrity": "sha512-pUh+xUQQhQzevjRHHFqqcTy0/dP/kS9I8HSrUydhihjuD09W6ldVWFtIrwhXdUJHis3i2rZNqEHpZH/cbinFbg==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true }, + "import-fresh": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", + "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -845,62 +862,58 @@ } }, "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, "inquirer": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", - "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.0.tgz", + "integrity": "sha512-rSdC7zelHdRQFkWnhsMu2+2SO41mpv2oF2zy4tMhmiLWkcKbOAs87fWAJhVXttKVwhdZvymvnuM95EyEXg2/tQ==", "dev": true, "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", + "ansi-escapes": "^4.2.1", + "chalk": "^2.4.2", + "cli-cursor": "^3.1.0", "cli-width": "^2.0.0", - "external-editor": "^2.0.4", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.15", + "mute-stream": "0.0.8", "run-async": "^2.2.0", - "rx-lite": "^4.0.8", - "rx-lite-aggregates": "^4.0.8", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", + "rxjs": "^6.4.0", + "string-width": "^4.1.0", + "strip-ansi": "^5.1.0", "through": "^2.3.6" } }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, - "is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, - "is-path-in-cwd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", - "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", "dev": true, "requires": { - "is-path-inside": "^1.0.0" + "is-extglob": "^2.1.1" } }, - "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", - "dev": true, - "requires": { - "path-is-inside": "^1.0.1" - } + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true }, "is-promise": { "version": "2.1.0", @@ -908,18 +921,6 @@ "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", "dev": true }, - "is-resolvable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", - "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -927,15 +928,15 @@ "dev": true }, "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, "js-yaml": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.11.0.tgz", - "integrity": "sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw==", + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -943,9 +944,9 @@ } }, "json-diff": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/json-diff/-/json-diff-0.5.2.tgz", - "integrity": "sha512-N7oapTQdD4rLMUtA7d1HATCPY/BpHuSNL1mhvIuoS0u5NideDvyR+gB/ntXB7ejFz/LM0XzPLNUJQcC68n5sBw==", + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/json-diff/-/json-diff-0.5.4.tgz", + "integrity": "sha512-q5Xmx9QXNOzOzIlMoYtLrLiu4Jl/Ce2bn0CNcv54PhyH89CI4GWlGVDye8ei2Ijt9R3U+vsWPsXpLUNob8bs8Q==", "dev": true, "requires": { "cli-color": "~0.1.6", @@ -971,9 +972,9 @@ } }, "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, "json-stable-stringify-without-jsonify": { @@ -1002,21 +1003,11 @@ } }, "lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", "dev": true }, - "lru-cache": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", - "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, "lru-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", @@ -1026,26 +1017,32 @@ "es5-ext": "~0.10.2" } }, + "mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=", + "dev": true + }, "memoizee": { - "version": "0.4.12", - "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.12.tgz", - "integrity": "sha512-sprBu6nwxBWBvBOh5v2jcsGqiGLlL2xr2dLub3vR8dnE8YB17omwtm/0NSHl8jjNbcsJd5GMWJAnTSVe/O0Wfg==", + "version": "0.4.14", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.14.tgz", + "integrity": "sha512-/SWFvWegAIYAO4NQMpcX+gcra0yEZu4OntmUdrBaWrJncxOqAziGFlHxc7yjKVK2uu3lpPW27P27wkR82wA8mg==", "dev": true, "requires": { "d": "1", - "es5-ext": "^0.10.30", + "es5-ext": "^0.10.45", "es6-weak-map": "^2.0.2", "event-emitter": "^0.3.5", "is-promise": "^2.1", "lru-queue": "0.1", "next-tick": "1", - "timers-ext": "^0.1.2" + "timers-ext": "^0.1.5" } }, "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true }, "minimatch": { @@ -1060,7 +1057,8 @@ "minimist": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true }, "mkdirp": { "version": "0.5.1", @@ -1080,15 +1078,15 @@ } }, "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", "dev": true }, "natural-compare": { @@ -1103,6 +1101,24 @@ "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", "dev": true }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "normalize-url": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz", + "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", + "dev": true, + "requires": { + "object-assign": "^4.0.1", + "prepend-http": "^1.0.0", + "query-string": "^4.1.0", + "sort-keys": "^1.0.0" + } + }, "npm": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/npm/-/npm-5.1.0.tgz", @@ -5696,12 +5712,12 @@ } }, "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", + "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", "dev": true, "requires": { - "mimic-fn": "^1.0.0" + "mimic-fn": "^2.1.0" } }, "optimist": { @@ -5719,27 +5735,21 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", "dev": true - }, - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", - "dev": true } } }, "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", "dev": true, "requires": { "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", + "fast-levenshtein": "~2.0.6", "levn": "~0.3.0", "prelude-ls": "~1.1.2", "type-check": "~0.3.2", - "wordwrap": "~1.0.0" + "word-wrap": "~1.2.3" } }, "os-homedir": { @@ -5754,16 +5764,25 @@ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", "dev": true }, "pify": { @@ -5787,34 +5806,34 @@ "pinkie": "^2.0.0" } }, - "pluralize": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", - "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", - "dev": true - }, "prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, + "prettier": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", + "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", "dev": true }, "progress": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", - "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, "q": { @@ -5823,60 +5842,45 @@ "integrity": "sha1-3QG6ydBtMObyGa7LglPunr3DCPE=", "dev": true }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "query-string": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", + "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", "dev": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" } }, "regexpp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.1.0.tgz", - "integrity": "sha512-LOPw8FpgdQF9etWMaAfG/WRthIdXJGYp4mJ2Jgn/2lpkbod9jPn0t9UqN7AxBOKNfzRbYyVfgc7Vk4t/MpnXgw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", "dev": true }, - "require-uncached": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", - "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", - "dev": true, - "requires": { - "caller-path": "^0.1.0", - "resolve-from": "^1.0.0" - } - }, "resolve-from": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", - "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", "dev": true, "requires": { - "onetime": "^2.0.0", + "onetime": "^5.1.0", "signal-exit": "^3.0.2" } }, "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "dev": true, "requires": { - "glob": "^7.0.5" + "glob": "^7.1.3" } }, "run-async": { @@ -5888,27 +5892,15 @@ "is-promise": "^2.1.0" } }, - "rx-lite": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", - "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", - "dev": true - }, - "rx-lite-aggregates": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", - "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", + "rxjs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz", + "integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==", "dev": true, "requires": { - "rx-lite": "*" + "tslib": "^1.9.0" } }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -5916,9 +5908,9 @@ "dev": true }, "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", "dev": true }, "shebang-command": { @@ -5943,12 +5935,31 @@ "dev": true }, "slice-ansi": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", - "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", "dev": true, "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", "is-fullwidth-code-point": "^2.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + } + } + }, + "sort-keys": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "dev": true, + "requires": { + "is-plain-obj": "^1.0.0" } }, "sprintf-js": { @@ -5957,66 +5968,128 @@ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", + "dev": true + }, "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } } }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } + "string.prototype.repeat": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/string.prototype.repeat/-/string.prototype.repeat-0.2.0.tgz", + "integrity": "sha1-q6Nt4I3O5qWjN9SbLqHaGyj8Ds8=", + "dev": true }, "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "^4.1.0" }, "dependencies": { "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true } } }, "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", + "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", "dev": true }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "strip-outer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz", + "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.2" + } + }, + "strip-url-auth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-url-auth/-/strip-url-auth-1.0.1.tgz", + "integrity": "sha1-IrD6OkE4WzO+PzMVUbu4N/oM164=", "dev": true }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, "table": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", - "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", "dev": true, "requires": { - "ajv": "^5.2.3", - "ajv-keywords": "^2.1.0", - "chalk": "^2.1.0", - "lodash": "^4.17.4", - "slice-ansi": "1.0.0", - "string-width": "^2.1.1" + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + } } }, "text-table": { @@ -6032,24 +6105,45 @@ "dev": true }, "timers-ext": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.5.tgz", - "integrity": "sha512-tsEStd7kmACHENhsUPaxb8Jf8/+GZZxyNFQbZD07HQOyooOa6At1rQqjffgvg7n+dxscQa9cjjMdWhJtsP2sxg==", + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", + "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", "dev": true, "requires": { - "es5-ext": "~0.10.14", + "es5-ext": "~0.10.46", "next-tick": "1" } }, "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "version": "0.0.31", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.31.tgz", + "integrity": "sha1-jzirlDjhcxXl29izZX6L+yd65Kc=", "dev": true, "requires": { - "os-tmpdir": "~1.0.2" + "os-tmpdir": "~1.0.1" } }, + "trim-repeated": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", + "integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.2" + } + }, + "tslib": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", + "dev": true + }, + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "dev": true + }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", @@ -6059,18 +6153,33 @@ "prelude-ls": "~1.1.2" } }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + }, + "typescript": { + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.3.tgz", + "integrity": "sha512-Mcr/Qk7hXqFBXMN7p7Lusj1ktCBydylfQM/FZCk5glCNQJrCUKPkMHdo9R0MTFWsC/4kPFvDS0fDPvukfCkFsw==", "dev": true }, "universalify": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz", - "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, "user-home": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz", @@ -6080,25 +6189,31 @@ "os-homedir": "^1.0.0" } }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "v8-compile-cache": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", + "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", "dev": true }, "which": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", - "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { "isexe": "^2.0.0" } }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", "dev": true }, "wrappy": { @@ -6108,19 +6223,13 @@ "dev": true }, "write": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", - "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", "dev": true, "requires": { "mkdirp": "^0.5.1" } - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true } } } diff --git a/package.json b/package.json index 9a90806..57786e8 100644 --- a/package.json +++ b/package.json @@ -1,47 +1,58 @@ { - "name": "fluent-spec", - "description": "Specification and documentation for Fluent", - "version": "1.0.0", - "private": true, - "scripts": { - "bench": "node -r esm --harmony-async-iteration ./test/bench.js ./test/benchmarks/gecko_strings.ftl", - "build:guide": "gitbook build guide build/guide", - "build": "npm run --silent build:guide", - "ci": "npm run --silent lint && npm test && npm run --silent test:ebnf", - "clean": "rm -rf build", - "deploy": "gh-pages -d build", - "generate:ebnf": "node -r esm bin/ebnf.js ./syntax/grammar.js > ./spec/fluent.ebnf", - "generate:fixtures": "make -sC test/fixtures", - "generate": "npm run --silent generate:ebnf && npm run --silent generate:fixtures", - "lint": "eslint **/*.js", - "test:ebnf": "node -r esm test/ebnf.js ./syntax/grammar.js ./spec/fluent.ebnf", - "test:fixtures": "node -r esm test/parser.js ./test/fixtures", - "test:unit": "node -r esm test/literals.js", - "test": "npm run --silent test:fixtures && npm run --silent test:unit" - }, - "homepage": "https://projectfluent.org", - "repository": { - "type": "git", - "url": "git+https://github.com/projectfluent/fluent.git" - }, - "author": "Mozilla ", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/projectfluent/fluent/issues" - }, - "devDependencies": { - "babylon": "^6.18.0", - "cli-color": "^1.2.0", - "difflib": "^0.2.4", - "eslint": "^4.19.1", - "fluent": "^0.6.4", - "fluent-syntax": "^0.7.0", - "gh-pages": "^1.1.0", - "gitbook-cli": "^2.3.0", - "json-diff": "^0.5.2" - }, - "dependencies": { - "esm": "^3.2.25", - "minimist": "^1.2.0" - } + "name": "fluent-spec", + "description": "Specification and documentation for Fluent", + "version": "1.0.0", + "private": true, + "type": "module", + "engines": { + "node": ">=14.0.0" + }, + "scripts": { + "bench": "node ./syntax/benchmarks/bench.js ./syntax/benchmarks/gecko_strings.ftl", + "build:format": "tsc -p format/tsconfig.json", + "build:guide": "gitbook build guide build/guide", + "build": "npm run --silent build:format && npm run --silent build:guide", + "ci": "npm run --silent lint && npm test && npm run --silent test:ebnf", + "clean": "rm -rf build", + "deploy": "gh-pages -d build", + "generate:ebnf": "node ./syntax/tools/ebnf.js ./syntax/parser/grammar.js > ./syntax/spec/fluent.ebnf", + "generate:fixtures": "make -sC ./syntax/test/fixtures", + "generate": "npm run --silent generate:ebnf && npm run --silent generate:fixtures", + "lint": "eslint ./syntax/**/*.js && prettier --check '**/*.ts'", + "pretty": "prettier --write '**/*.ts'", + "test:ebnf": "node ./syntax/test/ebnf.js ./syntax/parser/grammar.js ./syntax/spec/fluent.ebnf", + "test:fixtures": "node ./syntax/test/parser.js ./syntax/test/fixtures", + "test:unit": "node ./syntax/test/literals.js", + "test:format": "node ./format/test/resolver.js ./format/spec/", + "test": "npm run --silent test:fixtures && npm run --silent test:unit && npm run --silent test:format", + "watch": "tsc --watch" + }, + "homepage": "https://projectfluent.org", + "repository": { + "type": "git", + "url": "git+https://github.com/projectfluent/fluent.git" + }, + "author": "Mozilla ", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/projectfluent/fluent/issues" + }, + "devDependencies": { + "@fluent/bundle": "^0.14.0", + "@fluent/syntax": "^0.14.0", + "@types/commonmark": "^0.27.4", + "@types/minimist": "^1.2.0", + "@types/node": "^12.12.17", + "babylon": "^6.18.0", + "cli-color": "^2.0.0", + "commonmark": "^0.29.0", + "difflib": "^0.2.4", + "eslint": "^6.7.2", + "gh-pages": "^2.1.1", + "gitbook-cli": "^2.3.2", + "json-diff": "^0.5.4", + "minimist": "^1.2.0", + "prettier": "^1.19.1", + "typescript": "^3.7.3" + } } diff --git a/test/bench.js b/syntax/benchmarks/bench.js similarity index 75% rename from test/bench.js rename to syntax/benchmarks/bench.js index 0a411c1..5300c8e 100644 --- a/test/bench.js +++ b/syntax/benchmarks/bench.js @@ -1,18 +1,15 @@ -import fs from "fs"; +import runtime from "@fluent/bundle"; +import tooling from "@fluent/syntax"; import perf from "perf_hooks"; +import { Resource } from "../parser/grammar.js"; +import { readfile } from "../lib/util.js"; const {PerformanceObserver, performance} = perf; -import {parse} from "fluent-syntax"; -import {_parse} from "fluent"; -import {Resource} from "../syntax/grammar.js"; -import {readfile} from "./util.js"; let args = process.argv.slice(2); if (args.length < 1 || 2 < args.length) { - console.error( - "Usage: node -r esm --harmony-async-iteration " + - "bench.js FTL_FILE [SAMPLE SIZE = 30]"); + console.error("Usage: node bench.js FTL_FILE [SAMPLE SIZE = 30]"); process.exit(1); } @@ -31,8 +28,8 @@ async function main(ftl_file, sample_size = 30) { let subjects = new Map([ ["Reference", new Subject("Reference", () => Resource.run(ftl))], - ["Tooling", new Subject("Tooling", () => parse(ftl))], - ["Runtime", new Subject("Runtime", () => _parse(ftl))], + ["Tooling", new Subject("Tooling", () => tooling.parse(ftl))], + ["Runtime", new Subject("Runtime", () => new runtime.FluentResource(ftl))], ]); new PerformanceObserver(items => { @@ -72,13 +69,11 @@ function shuffle(...elements) { } function mean(elements) { - let miu = elements.reduce((acc, cur) => acc + cur) - / elements.length; + let miu = elements.reduce((acc, cur) => acc + cur) / elements.length; return +miu.toFixed(2); } function stdev(elements, mean) { - let sigma = elements.reduce((acc, cur) => acc + (cur - mean) ** 2, 0) - / (elements.length - 1); + let sigma = elements.reduce((acc, cur) => acc + (cur - mean) ** 2, 0) / (elements.length - 1); return +Math.sqrt(sigma).toFixed(2); } diff --git a/test/benchmarks/gecko_strings.ftl b/syntax/benchmarks/gecko_strings.ftl similarity index 100% rename from test/benchmarks/gecko_strings.ftl rename to syntax/benchmarks/gecko_strings.ftl diff --git a/lib/README.md b/syntax/lib/README.md similarity index 100% rename from lib/README.md rename to syntax/lib/README.md diff --git a/lib/combinators.js b/syntax/lib/combinators.js similarity index 100% rename from lib/combinators.js rename to syntax/lib/combinators.js diff --git a/lib/ebnf.js b/syntax/lib/ebnf.js similarity index 81% rename from lib/ebnf.js rename to syntax/lib/ebnf.js index 5b92a4e..4fdb411 100644 --- a/lib/ebnf.js +++ b/syntax/lib/ebnf.js @@ -1,11 +1,11 @@ -import {parse} from "babylon"; +import babylon from "babylon"; import walk from "./walker.js"; import visitor from "./visitor.js"; import serialize from "./serializer.js"; export default function ebnf(source, min_name_length = 0) { - let grammar_ast = parse(source, {sourceType: "module"}); + let grammar_ast = babylon.parse(source, {sourceType: "module"}); let rules = walk(grammar_ast, visitor); let state = { max_name_length: Math.max( diff --git a/test/parser.js b/syntax/lib/fixture.js similarity index 67% rename from test/parser.js rename to syntax/lib/fixture.js index e1e0bc1..f578fe8 100644 --- a/test/parser.js +++ b/syntax/lib/fixture.js @@ -1,27 +1,15 @@ import assert from "assert"; import path from "path"; -import {Resource} from "../syntax/grammar.js"; import {readdir, readfile, diff, PASS, FAIL} from "./util.js"; -const fixtures_dir = process.argv[2]; - -if (!fixtures_dir) { - console.error( - "Usage: node -r esm parser.js FIXTURE"); - process.exit(1); -} - -main(fixtures_dir); - -async function main(fixtures_dir) { +export async function test_fixtures(fixtures_dir, compare_fn) { if (fixtures_dir.endsWith(".ftl")) { // Actually, this is a filepath, split the path and the dir. var ftls = [path.basename(fixtures_dir)]; fixtures_dir = path.dirname(fixtures_dir); } else { let files = await readdir(fixtures_dir); - var ftls = files.filter( - filename => filename.endsWith(".ftl")); + var ftls = files.filter(filename => filename.endsWith(".ftl")); } // Collect all AssertionErrors. @@ -30,31 +18,25 @@ async function main(fixtures_dir) { // Parse each FTL fixture and compare against the expected AST. for (const file_name of ftls) { const ftl_path = path.join(fixtures_dir, file_name); - const ast_path = ftl_path.replace(/ftl$/, "json"); + const res_path = ftl_path.replace(/ftl$/, "json"); process.stdout.write(`${ftl_path} `); try { var ftl_source = await readfile(ftl_path); - var expected_ast = await readfile(ast_path); + var expected_result = await readfile(res_path); } catch (err) { errors.set(ftl_path, err); console.log(FAIL); continue; } - Resource.run(ftl_source).fold( - assert_equal, - err => assert.fail(err)); - - function assert_equal(ast) { - try { - validate(ast, expected_ast); - console.log(PASS); - } catch (err) { - errors.set(ftl_path, err); - console.log(FAIL); - } + try { + compare_fn(ftl_source, expected_result); + console.log(PASS); + } catch (err) { + errors.set(ftl_path, err); + console.log(FAIL); } } @@ -70,7 +52,7 @@ async function main(fixtures_dir) { exit_summary(errors.size); } -function validate(actual_ast, expected_serialized) { +export function validate_json(actual_ast, expected_serialized) { const actual_json = JSON.parse(JSON.stringify(actual_ast)); const expected_json = JSON.parse(expected_serialized); assert.deepEqual(actual_json, expected_json); @@ -95,9 +77,7 @@ ${err.message} } function exit_summary(error_count) { - const message = error_count - ? `Tests ${FAIL}: ${error_count}.` - : `All tests ${PASS}.`; + const message = error_count ? `Tests ${FAIL}: ${error_count}.` : `All tests ${PASS}.`; console.log(` ======================================================================== ${message} diff --git a/lib/mappers.js b/syntax/lib/mappers.js similarity index 100% rename from lib/mappers.js rename to syntax/lib/mappers.js diff --git a/lib/parser.js b/syntax/lib/parser.js similarity index 100% rename from lib/parser.js rename to syntax/lib/parser.js diff --git a/lib/result.js b/syntax/lib/result.js similarity index 100% rename from lib/result.js rename to syntax/lib/result.js diff --git a/lib/serializer.js b/syntax/lib/serializer.js similarity index 100% rename from lib/serializer.js rename to syntax/lib/serializer.js diff --git a/lib/stream.js b/syntax/lib/stream.js similarity index 100% rename from lib/stream.js rename to syntax/lib/stream.js diff --git a/test/suite.js b/syntax/lib/suite.js similarity index 87% rename from test/suite.js rename to syntax/lib/suite.js index 6743162..8be5e71 100644 --- a/test/suite.js +++ b/syntax/lib/suite.js @@ -1,9 +1,7 @@ import assert from "assert"; -import color from "cli-color"; import {diff, PASS, FAIL} from "./util.js"; -export default -function suite(fn) { +export default function suite(fn) { let errors = new Map(); fn(create_tester(errors)); @@ -45,9 +43,7 @@ ${diff(err.expected, err.actual)} } function exit_summary(error_count) { - const message = error_count - ? `Tests ${FAIL}: ${error_count}.` - : `All tests ${PASS}.`; + const message = error_count ? `Tests ${FAIL}: ${error_count}.` : `All tests ${PASS}.`; console.log(` ======================================================================== ${message} diff --git a/syntax/lib/util.js b/syntax/lib/util.js new file mode 100644 index 0000000..358ebb4 --- /dev/null +++ b/syntax/lib/util.js @@ -0,0 +1,23 @@ +import fs from "fs"; +import color from "cli-color"; +import jsonDiff from "json-diff"; + +export function readdir(path) { + return new Promise(function(resolve, reject) { + fs.readdir(path, function(err, filenames) { + return err ? reject(err) : resolve(filenames); + }); + }); +} + +export function readfile(path) { + return new Promise(function(resolve, reject) { + fs.readFile(path, function(err, file) { + return err ? reject(err) : resolve(file.toString()); + }); + }); +} + +export const diff = jsonDiff.diffString; +export const PASS = color.green("PASS"); +export const FAIL = color.red("FAIL"); diff --git a/lib/visitor.js b/syntax/lib/visitor.js similarity index 100% rename from lib/visitor.js rename to syntax/lib/visitor.js diff --git a/lib/walker.js b/syntax/lib/walker.js similarity index 100% rename from lib/walker.js rename to syntax/lib/walker.js diff --git a/syntax/abstract.js b/syntax/parser/abstract.js similarity index 100% rename from syntax/abstract.js rename to syntax/parser/abstract.js diff --git a/syntax/parser/ast.d.ts b/syntax/parser/ast.d.ts new file mode 100644 index 0000000..d7504d0 --- /dev/null +++ b/syntax/parser/ast.d.ts @@ -0,0 +1,61 @@ +export declare class SyntaxNode { + readonly type: string; +} + +export declare class Identifier extends SyntaxNode { + readonly type: "Identifer"; + readonly name: string; +} + +export declare class StringLiteral extends SyntaxNode { + readonly type: "StringLiteral"; + readonly value: string; + parse(): {value: string}; +} + +export declare class MessageReference extends SyntaxNode { + readonly type: "MessageReference"; + readonly id: Identifier; + readonly attribute: Identifier | null; +} + +export type InlineExpression = StringLiteral | MessageReference; + +export type Expression = InlineExpression; + +export declare class TextElement extends SyntaxNode { + readonly type: "TextElement"; + readonly value: string; +} + +export declare class Placeable extends SyntaxNode { + readonly type: "Placeable"; + readonly expression: Expression; +} + +export type PatternElement = TextElement | Placeable; + +export declare class Pattern extends SyntaxNode { + readonly type: "Pattern"; + readonly elements: Array; +} + +export declare class Message extends SyntaxNode { + readonly type: "Message"; + readonly id: Identifier; + readonly value: Pattern | null; + readonly attributes: Array; +} + +export declare class Attribute extends SyntaxNode { + readonly type: "Attribute"; + readonly id: Identifier; + readonly value: Pattern; +} + +export type Entry = Message; + +export declare class Resource extends SyntaxNode { + readonly type: "Resource"; + readonly body: Array; +} diff --git a/syntax/ast.js b/syntax/parser/ast.js similarity index 100% rename from syntax/ast.js rename to syntax/parser/ast.js diff --git a/syntax/parser/grammar.d.ts b/syntax/parser/grammar.d.ts new file mode 100644 index 0000000..56a3c14 --- /dev/null +++ b/syntax/parser/grammar.d.ts @@ -0,0 +1,10 @@ +import * as ast from "./ast"; +interface Result { + fold(s: (value: T) => T, f: (err: E) => never): T; +} + +interface Parser { + run(input: string): Result; +} + +export declare let Resource: Parser; diff --git a/syntax/grammar.js b/syntax/parser/grammar.js similarity index 100% rename from syntax/grammar.js rename to syntax/parser/grammar.js diff --git a/spec/CHANGELOG.md b/syntax/spec/CHANGELOG.md similarity index 100% rename from spec/CHANGELOG.md rename to syntax/spec/CHANGELOG.md diff --git a/spec/README.md b/syntax/spec/README.md similarity index 100% rename from spec/README.md rename to syntax/spec/README.md diff --git a/spec/compatibility.md b/syntax/spec/compatibility.md similarity index 100% rename from spec/compatibility.md rename to syntax/spec/compatibility.md diff --git a/spec/errors.md b/syntax/spec/errors.md similarity index 100% rename from spec/errors.md rename to syntax/spec/errors.md diff --git a/spec/fluent.ebnf b/syntax/spec/fluent.ebnf similarity index 100% rename from spec/fluent.ebnf rename to syntax/spec/fluent.ebnf diff --git a/spec/recommendations.md b/syntax/spec/recommendations.md similarity index 100% rename from spec/recommendations.md rename to syntax/spec/recommendations.md diff --git a/spec/valid.md b/syntax/spec/valid.md similarity index 100% rename from spec/valid.md rename to syntax/spec/valid.md diff --git a/test/ebnf.js b/syntax/test/ebnf.js similarity index 76% rename from test/ebnf.js rename to syntax/test/ebnf.js index 2fcbd11..eaefe3b 100644 --- a/test/ebnf.js +++ b/syntax/test/ebnf.js @@ -1,14 +1,12 @@ import color from "cli-color"; import difflib from "difflib"; +import { FAIL, PASS, readfile } from "../lib/util.js"; import ebnf from "../lib/ebnf.js"; -import {readfile, PASS, FAIL} from "./util.js"; let args = process.argv.slice(2); if (args.length !== 2) { - console.error( - "Usage: node -r esm ebnf.js " + - "GRAMMAR_FILE EXPECTED_EBNF"); + console.error("Usage: node ebnf.js " + "GRAMMAR_FILE EXPECTED_EBNF"); process.exit(1); } @@ -18,12 +16,10 @@ async function main(grammar_mjs, fluent_ebnf) { let grammar_source = await readfile(grammar_mjs); let grammar_ebnf = await readfile(fluent_ebnf); - let diffs = difflib.unifiedDiff( - lines(grammar_ebnf), - lines(ebnf(grammar_source)), { - fromfile: "Expected", - tofile: "Actual", - }); + let diffs = difflib.unifiedDiff(lines(grammar_ebnf), lines(ebnf(grammar_source)), { + fromfile: "Expected", + tofile: "Actual", + }); for (let diff of diffs) { if (diff.startsWith("+")) { diff --git a/syntax/test/fixtures/.gitattributes b/syntax/test/fixtures/.gitattributes new file mode 100644 index 0000000..535a845 --- /dev/null +++ b/syntax/test/fixtures/.gitattributes @@ -0,0 +1,2 @@ +/crlf.ftl eol=crlf +/cr.ftl eol=cr diff --git a/test/fixtures/Makefile b/syntax/test/fixtures/Makefile similarity index 75% rename from test/fixtures/Makefile rename to syntax/test/fixtures/Makefile index 3caf947..351994c 100644 --- a/test/fixtures/Makefile +++ b/syntax/test/fixtures/Makefile @@ -5,7 +5,7 @@ all: $(AST_FIXTURES) .PHONY: $(AST_FIXTURES) $(AST_FIXTURES): %.json: %.ftl - @node -r esm ../../bin/parse.js $< \ + node ../../tools/parse.js $< \ 2> /dev/null \ 1> $@; - @echo "$< → $@" + @echo "syntax/$< → $@" diff --git a/test/fixtures/any_char.ftl b/syntax/test/fixtures/any_char.ftl similarity index 100% rename from test/fixtures/any_char.ftl rename to syntax/test/fixtures/any_char.ftl diff --git a/test/fixtures/any_char.json b/syntax/test/fixtures/any_char.json similarity index 100% rename from test/fixtures/any_char.json rename to syntax/test/fixtures/any_char.json diff --git a/test/fixtures/astral.ftl b/syntax/test/fixtures/astral.ftl similarity index 100% rename from test/fixtures/astral.ftl rename to syntax/test/fixtures/astral.ftl diff --git a/test/fixtures/astral.json b/syntax/test/fixtures/astral.json similarity index 100% rename from test/fixtures/astral.json rename to syntax/test/fixtures/astral.json diff --git a/test/fixtures/call_expressions.ftl b/syntax/test/fixtures/call_expressions.ftl similarity index 100% rename from test/fixtures/call_expressions.ftl rename to syntax/test/fixtures/call_expressions.ftl diff --git a/test/fixtures/call_expressions.json b/syntax/test/fixtures/call_expressions.json similarity index 100% rename from test/fixtures/call_expressions.json rename to syntax/test/fixtures/call_expressions.json diff --git a/test/fixtures/callee_expressions.ftl b/syntax/test/fixtures/callee_expressions.ftl similarity index 100% rename from test/fixtures/callee_expressions.ftl rename to syntax/test/fixtures/callee_expressions.ftl diff --git a/test/fixtures/callee_expressions.json b/syntax/test/fixtures/callee_expressions.json similarity index 100% rename from test/fixtures/callee_expressions.json rename to syntax/test/fixtures/callee_expressions.json diff --git a/test/fixtures/comments.ftl b/syntax/test/fixtures/comments.ftl similarity index 100% rename from test/fixtures/comments.ftl rename to syntax/test/fixtures/comments.ftl diff --git a/test/fixtures/comments.json b/syntax/test/fixtures/comments.json similarity index 100% rename from test/fixtures/comments.json rename to syntax/test/fixtures/comments.json diff --git a/test/fixtures/cr.ftl b/syntax/test/fixtures/cr.ftl similarity index 100% rename from test/fixtures/cr.ftl rename to syntax/test/fixtures/cr.ftl diff --git a/test/fixtures/cr.json b/syntax/test/fixtures/cr.json similarity index 100% rename from test/fixtures/cr.json rename to syntax/test/fixtures/cr.json diff --git a/test/fixtures/crlf.ftl b/syntax/test/fixtures/crlf.ftl similarity index 100% rename from test/fixtures/crlf.ftl rename to syntax/test/fixtures/crlf.ftl diff --git a/test/fixtures/crlf.json b/syntax/test/fixtures/crlf.json similarity index 100% rename from test/fixtures/crlf.json rename to syntax/test/fixtures/crlf.json diff --git a/test/fixtures/eof_comment.ftl b/syntax/test/fixtures/eof_comment.ftl similarity index 100% rename from test/fixtures/eof_comment.ftl rename to syntax/test/fixtures/eof_comment.ftl diff --git a/test/fixtures/eof_comment.json b/syntax/test/fixtures/eof_comment.json similarity index 100% rename from test/fixtures/eof_comment.json rename to syntax/test/fixtures/eof_comment.json diff --git a/test/fixtures/eof_empty.ftl b/syntax/test/fixtures/eof_empty.ftl similarity index 100% rename from test/fixtures/eof_empty.ftl rename to syntax/test/fixtures/eof_empty.ftl diff --git a/test/fixtures/eof_empty.json b/syntax/test/fixtures/eof_empty.json similarity index 100% rename from test/fixtures/eof_empty.json rename to syntax/test/fixtures/eof_empty.json diff --git a/test/fixtures/eof_id.ftl b/syntax/test/fixtures/eof_id.ftl similarity index 100% rename from test/fixtures/eof_id.ftl rename to syntax/test/fixtures/eof_id.ftl diff --git a/test/fixtures/eof_id.json b/syntax/test/fixtures/eof_id.json similarity index 100% rename from test/fixtures/eof_id.json rename to syntax/test/fixtures/eof_id.json diff --git a/test/fixtures/eof_id_equals.ftl b/syntax/test/fixtures/eof_id_equals.ftl similarity index 100% rename from test/fixtures/eof_id_equals.ftl rename to syntax/test/fixtures/eof_id_equals.ftl diff --git a/test/fixtures/eof_id_equals.json b/syntax/test/fixtures/eof_id_equals.json similarity index 100% rename from test/fixtures/eof_id_equals.json rename to syntax/test/fixtures/eof_id_equals.json diff --git a/test/fixtures/eof_junk.ftl b/syntax/test/fixtures/eof_junk.ftl similarity index 100% rename from test/fixtures/eof_junk.ftl rename to syntax/test/fixtures/eof_junk.ftl diff --git a/test/fixtures/eof_junk.json b/syntax/test/fixtures/eof_junk.json similarity index 100% rename from test/fixtures/eof_junk.json rename to syntax/test/fixtures/eof_junk.json diff --git a/test/fixtures/eof_value.ftl b/syntax/test/fixtures/eof_value.ftl similarity index 100% rename from test/fixtures/eof_value.ftl rename to syntax/test/fixtures/eof_value.ftl diff --git a/test/fixtures/eof_value.json b/syntax/test/fixtures/eof_value.json similarity index 100% rename from test/fixtures/eof_value.json rename to syntax/test/fixtures/eof_value.json diff --git a/test/fixtures/escaped_characters.ftl b/syntax/test/fixtures/escaped_characters.ftl similarity index 100% rename from test/fixtures/escaped_characters.ftl rename to syntax/test/fixtures/escaped_characters.ftl diff --git a/test/fixtures/escaped_characters.json b/syntax/test/fixtures/escaped_characters.json similarity index 100% rename from test/fixtures/escaped_characters.json rename to syntax/test/fixtures/escaped_characters.json diff --git a/test/fixtures/junk.ftl b/syntax/test/fixtures/junk.ftl similarity index 100% rename from test/fixtures/junk.ftl rename to syntax/test/fixtures/junk.ftl diff --git a/test/fixtures/junk.json b/syntax/test/fixtures/junk.json similarity index 100% rename from test/fixtures/junk.json rename to syntax/test/fixtures/junk.json diff --git a/test/fixtures/leading_dots.ftl b/syntax/test/fixtures/leading_dots.ftl similarity index 100% rename from test/fixtures/leading_dots.ftl rename to syntax/test/fixtures/leading_dots.ftl diff --git a/test/fixtures/leading_dots.json b/syntax/test/fixtures/leading_dots.json similarity index 100% rename from test/fixtures/leading_dots.json rename to syntax/test/fixtures/leading_dots.json diff --git a/test/fixtures/literal_expressions.ftl b/syntax/test/fixtures/literal_expressions.ftl similarity index 100% rename from test/fixtures/literal_expressions.ftl rename to syntax/test/fixtures/literal_expressions.ftl diff --git a/test/fixtures/literal_expressions.json b/syntax/test/fixtures/literal_expressions.json similarity index 100% rename from test/fixtures/literal_expressions.json rename to syntax/test/fixtures/literal_expressions.json diff --git a/test/fixtures/member_expressions.ftl b/syntax/test/fixtures/member_expressions.ftl similarity index 100% rename from test/fixtures/member_expressions.ftl rename to syntax/test/fixtures/member_expressions.ftl diff --git a/test/fixtures/member_expressions.json b/syntax/test/fixtures/member_expressions.json similarity index 100% rename from test/fixtures/member_expressions.json rename to syntax/test/fixtures/member_expressions.json diff --git a/test/fixtures/messages.ftl b/syntax/test/fixtures/messages.ftl similarity index 100% rename from test/fixtures/messages.ftl rename to syntax/test/fixtures/messages.ftl diff --git a/test/fixtures/messages.json b/syntax/test/fixtures/messages.json similarity index 100% rename from test/fixtures/messages.json rename to syntax/test/fixtures/messages.json diff --git a/test/fixtures/mixed_entries.ftl b/syntax/test/fixtures/mixed_entries.ftl similarity index 100% rename from test/fixtures/mixed_entries.ftl rename to syntax/test/fixtures/mixed_entries.ftl diff --git a/test/fixtures/mixed_entries.json b/syntax/test/fixtures/mixed_entries.json similarity index 100% rename from test/fixtures/mixed_entries.json rename to syntax/test/fixtures/mixed_entries.json diff --git a/test/fixtures/multiline_values.ftl b/syntax/test/fixtures/multiline_values.ftl similarity index 100% rename from test/fixtures/multiline_values.ftl rename to syntax/test/fixtures/multiline_values.ftl diff --git a/test/fixtures/multiline_values.json b/syntax/test/fixtures/multiline_values.json similarity index 100% rename from test/fixtures/multiline_values.json rename to syntax/test/fixtures/multiline_values.json diff --git a/test/fixtures/numbers.ftl b/syntax/test/fixtures/numbers.ftl similarity index 100% rename from test/fixtures/numbers.ftl rename to syntax/test/fixtures/numbers.ftl diff --git a/test/fixtures/numbers.json b/syntax/test/fixtures/numbers.json similarity index 100% rename from test/fixtures/numbers.json rename to syntax/test/fixtures/numbers.json diff --git a/test/fixtures/obsolete.ftl b/syntax/test/fixtures/obsolete.ftl similarity index 100% rename from test/fixtures/obsolete.ftl rename to syntax/test/fixtures/obsolete.ftl diff --git a/test/fixtures/obsolete.json b/syntax/test/fixtures/obsolete.json similarity index 100% rename from test/fixtures/obsolete.json rename to syntax/test/fixtures/obsolete.json diff --git a/test/fixtures/placeables.ftl b/syntax/test/fixtures/placeables.ftl similarity index 100% rename from test/fixtures/placeables.ftl rename to syntax/test/fixtures/placeables.ftl diff --git a/test/fixtures/placeables.json b/syntax/test/fixtures/placeables.json similarity index 100% rename from test/fixtures/placeables.json rename to syntax/test/fixtures/placeables.json diff --git a/test/fixtures/reference_expressions.ftl b/syntax/test/fixtures/reference_expressions.ftl similarity index 100% rename from test/fixtures/reference_expressions.ftl rename to syntax/test/fixtures/reference_expressions.ftl diff --git a/test/fixtures/reference_expressions.json b/syntax/test/fixtures/reference_expressions.json similarity index 100% rename from test/fixtures/reference_expressions.json rename to syntax/test/fixtures/reference_expressions.json diff --git a/test/fixtures/select_expressions.ftl b/syntax/test/fixtures/select_expressions.ftl similarity index 100% rename from test/fixtures/select_expressions.ftl rename to syntax/test/fixtures/select_expressions.ftl diff --git a/test/fixtures/select_expressions.json b/syntax/test/fixtures/select_expressions.json similarity index 100% rename from test/fixtures/select_expressions.json rename to syntax/test/fixtures/select_expressions.json diff --git a/test/fixtures/select_indent.ftl b/syntax/test/fixtures/select_indent.ftl similarity index 100% rename from test/fixtures/select_indent.ftl rename to syntax/test/fixtures/select_indent.ftl diff --git a/test/fixtures/select_indent.json b/syntax/test/fixtures/select_indent.json similarity index 100% rename from test/fixtures/select_indent.json rename to syntax/test/fixtures/select_indent.json diff --git a/test/fixtures/sparse_entries.ftl b/syntax/test/fixtures/sparse_entries.ftl similarity index 100% rename from test/fixtures/sparse_entries.ftl rename to syntax/test/fixtures/sparse_entries.ftl diff --git a/test/fixtures/sparse_entries.json b/syntax/test/fixtures/sparse_entries.json similarity index 100% rename from test/fixtures/sparse_entries.json rename to syntax/test/fixtures/sparse_entries.json diff --git a/test/fixtures/tab.ftl b/syntax/test/fixtures/tab.ftl similarity index 100% rename from test/fixtures/tab.ftl rename to syntax/test/fixtures/tab.ftl diff --git a/test/fixtures/tab.json b/syntax/test/fixtures/tab.json similarity index 100% rename from test/fixtures/tab.json rename to syntax/test/fixtures/tab.json diff --git a/test/fixtures/term_parameters.ftl b/syntax/test/fixtures/term_parameters.ftl similarity index 100% rename from test/fixtures/term_parameters.ftl rename to syntax/test/fixtures/term_parameters.ftl diff --git a/test/fixtures/term_parameters.json b/syntax/test/fixtures/term_parameters.json similarity index 100% rename from test/fixtures/term_parameters.json rename to syntax/test/fixtures/term_parameters.json diff --git a/test/fixtures/terms.ftl b/syntax/test/fixtures/terms.ftl similarity index 100% rename from test/fixtures/terms.ftl rename to syntax/test/fixtures/terms.ftl diff --git a/test/fixtures/terms.json b/syntax/test/fixtures/terms.json similarity index 100% rename from test/fixtures/terms.json rename to syntax/test/fixtures/terms.json diff --git a/test/fixtures/variables.ftl b/syntax/test/fixtures/variables.ftl similarity index 100% rename from test/fixtures/variables.ftl rename to syntax/test/fixtures/variables.ftl diff --git a/test/fixtures/variables.json b/syntax/test/fixtures/variables.json similarity index 100% rename from test/fixtures/variables.json rename to syntax/test/fixtures/variables.json diff --git a/test/fixtures/variant_keys.ftl b/syntax/test/fixtures/variant_keys.ftl similarity index 100% rename from test/fixtures/variant_keys.ftl rename to syntax/test/fixtures/variant_keys.ftl diff --git a/test/fixtures/variant_keys.json b/syntax/test/fixtures/variant_keys.json similarity index 100% rename from test/fixtures/variant_keys.json rename to syntax/test/fixtures/variant_keys.json diff --git a/test/fixtures/whitespace_in_value.ftl b/syntax/test/fixtures/whitespace_in_value.ftl similarity index 100% rename from test/fixtures/whitespace_in_value.ftl rename to syntax/test/fixtures/whitespace_in_value.ftl diff --git a/test/fixtures/whitespace_in_value.json b/syntax/test/fixtures/whitespace_in_value.json similarity index 100% rename from test/fixtures/whitespace_in_value.json rename to syntax/test/fixtures/whitespace_in_value.json diff --git a/test/literals.js b/syntax/test/literals.js similarity index 87% rename from test/literals.js rename to syntax/test/literals.js index 7b0fd69..21e0ef8 100644 --- a/test/literals.js +++ b/syntax/test/literals.js @@ -1,23 +1,21 @@ -/* eslint quotes: "off" */ -import suite from "./suite.js"; -import {StringLiteral, NumberLiteral} from "../syntax/grammar.js"; +import { NumberLiteral, StringLiteral } from "../../syntax/parser/grammar.js"; +import suite from "../lib/suite.js"; if (process.argv.length > 2) { - console.error("Usage: node -r esm literals.js"); + console.error("Usage: node literals.js"); process.exit(1); } suite(tester => { let title = node => `${node.type} {value: "${node.value}"}`; let test = (result, expected) => - result.fold( - node => tester.deep_equal(title(node), node.parse(), expected), - tester.fail); + result.fold(node => tester.deep_equal(title(node), node.parse(), expected), tester.fail); // Unescape raw value of StringLiterals. { + /* eslint-disable quotes */ test(StringLiteral.run(`"abc"`), {value: "abc"}); - test(StringLiteral.run(`"\\""`), {value: "\""}); + test(StringLiteral.run(`"\\""`), {value: '"'}); test(StringLiteral.run(`"\\\\"`), {value: "\\"}); // Unicode escapes. @@ -33,11 +31,11 @@ suite(tester => { // Literal braces. test(StringLiteral.run(`"{"`), {value: "{"}); test(StringLiteral.run(`"}"`), {value: "}"}); - }; + /* eslint-enable quotes */ + } // Parse float value and precision of NumberLiterals. { - // Integers. test(NumberLiteral.run("0"), {value: 0, precision: 0}); test(NumberLiteral.run("1"), {value: 1, precision: 0}); @@ -69,5 +67,5 @@ suite(tester => { test(NumberLiteral.run("-01.03"), {value: -1.03, precision: 2}); test(NumberLiteral.run("-1.0300"), {value: -1.03, precision: 4}); test(NumberLiteral.run("-01.0300"), {value: -1.03, precision: 4}); - }; + } }); diff --git a/syntax/test/parser.js b/syntax/test/parser.js new file mode 100644 index 0000000..ebd6515 --- /dev/null +++ b/syntax/test/parser.js @@ -0,0 +1,19 @@ +import assert from "assert"; +import { Resource } from "../../syntax/parser/grammar.js"; +import { test_fixtures, validate_json } from "../lib/fixture.js"; + +const fixtures_dir = process.argv[2]; + +if (!fixtures_dir) { + console.error("Usage: node parser.js FIXTURE"); + process.exit(1); +} + +test_fixtures(fixtures_dir, (ftl_source, expected_ast) => { + Resource.run(ftl_source).fold( + ast => { + validate_json(ast, expected_ast); + }, + err => assert.fail(err) + ); +}); diff --git a/bin/ebnf.js b/syntax/tools/ebnf.js similarity index 89% rename from bin/ebnf.js rename to syntax/tools/ebnf.js index 34ef6ae..10f4d72 100644 --- a/bin/ebnf.js +++ b/syntax/tools/ebnf.js @@ -26,14 +26,14 @@ if (file_path === "-") { function exit_help(exit_code) { console.log(` - Usage: node -r esm ebnf.js [OPTIONS] + Usage: node ebnf.js [OPTIONS] When FILE is "-", read text from stdin. Examples: - node -r esm ebnf.js path/to/grammar.js - cat path/to/grammar.js | node -r esm ebnf.js - + node ebnf.js path/to/grammar.js + cat path/to/grammar.js | node ebnf.js - Options: diff --git a/bin/parse.js b/syntax/tools/parse.js similarity index 86% rename from bin/parse.js rename to syntax/tools/parse.js index ba5ee1f..827dda7 100644 --- a/bin/parse.js +++ b/syntax/tools/parse.js @@ -1,7 +1,7 @@ import fs from "fs"; import readline from "readline"; import parse_args from "minimist"; -import {Resource} from "../syntax/grammar.js"; +import {Resource} from "../parser/grammar.js"; const argv = parse_args(process.argv.slice(2), { boolean: ["help"], @@ -26,14 +26,14 @@ if (file_path === "-") { function exit_help(exit_code) { console.log(` - Usage: node -r esm parse.js [OPTIONS] + Usage: node parse.js [OPTIONS] When FILE is "-", read text from stdin. Examples: - node -r esm parse.js path/to/file.ftl - cat path/to/file.ftl | node -r esm parse.js - + node parse.js path/to/file.ftl + cat path/to/file.ftl | node parse.js - Options: diff --git a/test/util.js b/test/util.js deleted file mode 100644 index 93202c0..0000000 --- a/test/util.js +++ /dev/null @@ -1,42 +0,0 @@ -import fs from "fs"; -import color from "cli-color"; -import json_diff from "json-diff"; - -function nonBlank(line) { - return !/^\s*$/.test(line); -} - -function countIndent(line) { - const [indent] = line.match(/^\s*/); - return indent.length; -} - -export function ftl(strings) { - const [code] = strings; - const lines = code.split("\n").slice(1, -1); - const indents = lines.filter(nonBlank).map(countIndent); - const common = Math.min(...indents); - const indent = new RegExp(`^\\s{${common}}`); - const dedented = lines.map(line => line.replace(indent, "")); - return `${dedented.join("\n")}\n`; -} - -export function readdir(path) { - return new Promise(function(resolve, reject) { - fs.readdir(path, function(err, filenames) { - return err ? reject(err) : resolve(filenames); - }); - }); -} - -export function readfile(path) { - return new Promise(function(resolve, reject) { - fs.readFile(path, function(err, file) { - return err ? reject(err) : resolve(file.toString()); - }); - }); -} - -export const {diffString: diff} = json_diff; -export const PASS = color.green("PASS"); -export const FAIL = color.red("FAIL");