diff --git a/.eslintrc.yml b/.eslintrc.yml index 6ac823ea0..8ad9b79f0 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -72,6 +72,7 @@ rules: unicorn/no-useless-undefined: error unicorn/prefer-includes: error unicorn/prefer-number-properties: error + unicorn/prefer-regexp-test: error unicorn/prefer-string-slice: error overrides: - files: diff --git a/changelog_unreleased/handlebars/9978.md b/changelog_unreleased/handlebars/9978.md new file mode 100644 index 000000000..e4de4cfc5 --- /dev/null +++ b/changelog_unreleased/handlebars/9978.md @@ -0,0 +1,43 @@ +#### Print final blockParam on its own line (#9978 by @dcyriller) + + +```hbs + +{{#block param hashKey=hashValue hashKey=hashValue hashKey=hashValue as |blockParam|}} + Hello +{{/block}} + +{{!-- Prettier stable --}} + +{{#block + param + hashKey=hashValue + hashKey=hashValue + hashKey=hashValue as |blockParam| +}} + Hello +{{/block}} + +{{!-- Prettier master --}} + +{{#block + param + hashKey=hashValue + hashKey=hashValue + hashKey=hashValue + as |blockParam| +}} + Hello +{{/block}} +``` diff --git a/changelog_unreleased/html/7865.md b/changelog_unreleased/html/7865.md new file mode 100644 index 000000000..95a225f04 --- /dev/null +++ b/changelog_unreleased/html/7865.md @@ -0,0 +1,22 @@ +#### Prefix-based multiline formatting for the `class` attribute (#7865 by @thorn0) + +Formatting of HTML class names will now keep classes on one line until the line length limit is reached; at that point, consecutive classes with the same prefix will be grouped together on each line. For layout frameworks such as Bootstrap and Tailwind CSS, which add many classes to an element, this is important for readability and maintainability vs. the previous behavior (keeping all classes on one line) or e.g. putting each class on its own line. + + +```html + +
+ + +
+``` diff --git a/changelog_unreleased/javascript/10085.md b/changelog_unreleased/javascript/10085.md new file mode 100644 index 000000000..a38c07809 --- /dev/null +++ b/changelog_unreleased/javascript/10085.md @@ -0,0 +1,28 @@ +#### Improve visual separation between header and body in classes with multiline headers (#10085 by @sosukesuzuki) + + +```ts +// Input +class loooooooooooooooooooong + extends looooooooooooooooooong + implements loooooooooooooooooooong +{ + property: string; +} + +// Prettier stable +class loooooooooooooooooooong + extends looooooooooooooooooong + implements loooooooooooooooooooong { + property: string; +} + +// Prettier master +class loooooooooooooooooooong + extends looooooooooooooooooong + implements loooooooooooooooooooong +{ + property: string; +} + +``` diff --git a/changelog_unreleased/javascript/9787.md b/changelog_unreleased/javascript/9787.md index 8a8c45ee4..e24fb76a2 100644 --- a/changelog_unreleased/javascript/9787.md +++ b/changelog_unreleased/javascript/9787.md @@ -1,4 +1,4 @@ -#### Print null items in arguments (#9787 by @sosukesuzuki) +#### Disable Babel's error recovery for omitted call arguments (#9787 by @sosukesuzuki, #10065 by @thorn0) ```js @@ -9,5 +9,7 @@ foo("a", , "b"); TypeError: Cannot read property 'type' of null // Prettier master -foo("a", , "b"); +[error] stdin: SyntaxError: Argument expression expected. (1:10) +[error] > 1 | foo("a", , "b"); +[error] | ^ ``` diff --git a/docs/options.md b/docs/options.md index 57036ffe3..9a853bc98 100644 --- a/docs/options.md +++ b/docs/options.md @@ -308,17 +308,17 @@ Valid options: ## HTML Whitespace Sensitivity -_First available in v1.15.0_ +_First available in v1.15.0. First available for Handlebars in 2.3.0_ -Specify the global whitespace sensitivity for HTML files, see [whitespace-sensitive formatting] for more info. +Specify the global whitespace sensitivity for HTML, Vue, Angular, and Handlebars. See [whitespace-sensitive formatting] for more info. [whitespace-sensitive formatting]: https://prettier.io/blog/2018/11/07/1.15.0.html#whitespace-sensitive-formatting Valid options: -- `"css"` - Respect the default value of CSS `display` property. -- `"strict"` - Whitespaces are considered sensitive. -- `"ignore"` - Whitespaces are considered insensitive. +- `"css"` - Respect the default value of CSS `display` property. For Handlebars treated same as `ignore`. +- `"strict"` - Whitespace (or the lack of it) around all tags is considered significant. +- `"ignore"` - Whitespace (or the lack of it) around all tags is considered insignificant. | Default | CLI Override | API Override | | ------- | ------------------------------------------------------------------------ | ----------------------------------------------------------------------- | diff --git a/docs/rationale.md b/docs/rationale.md index 94752bb18..65ac3a9cf 100644 --- a/docs/rationale.md +++ b/docs/rationale.md @@ -77,6 +77,10 @@ const user = { [stylesheets]: https://github.com/prettier/prettier/issues/74#issuecomment-275262094 [keyed methods]: https://github.com/prettier/prettier/pull/495#issuecomment-275745434 +> ♻️ **A note on formatting reversibility:** The semi-manual formatting for object literals is in fact a workaround, not a feature. It was implemented only because at the time a good heuristic wasn’t found and an urgent fix was needed. However, as a general strategy, Prettier avoids _non-reversible_ formatting like that, so the team is still looking for heuristics that would allow either to remove this behavior completely or at least to reduce the number of situations where it’s applied. +> +> What does **reversible** mean? Once an object literal becomes multiline, Prettier won’t collapse it back. If in Prettier-formatted code, we add a property to an object literal, run Prettier, then change our mind, remove the added property, and then run Prettier again, we might end up with a formatting not identical to the initial one. This useless change might even get included in a commit, which is exactly the kind of situation Prettier was created to prevent. + ### Decorators Just like with objects, decorators are used for a lot of different things. Sometimes it makes sense to write decorators _above_ the line they're decorating, sometimes it’s nicer if they're on the _same_ line. We haven’t been able to find a good rule for this, so Prettier keeps your decorator positioned like you wrote them (if they fit on the line). This isn’t ideal, but a pragmatic solution to a difficult problem. diff --git a/package.json b/package.json index 84a0d9a13..8f897d4b3 100644 --- a/package.json +++ b/package.json @@ -20,12 +20,12 @@ "bin" ], "dependencies": { - "@angular/compiler": "11.0.7", + "@angular/compiler": "11.0.9", "@babel/code-frame": "7.12.11", "@babel/parser": "7.12.11", "@glimmer/syntax": "0.73.1", "@iarna/toml": "2.2.5", - "@typescript-eslint/typescript-estree": "4.12.0", + "@typescript-eslint/typescript-estree": "4.14.0", "angular-estree-parser": "2.3.0", "angular-html-parser": "1.7.1", "camelcase": "6.2.0", @@ -59,7 +59,7 @@ "linguist-languages": "7.12.2", "lodash": "4.17.20", "mem": "8.0.0", - "meriyah": "3.1.6", + "meriyah": "4.0.0", "minimatch": "3.0.4", "minimist": "1.2.5", "n-readlines": "1.0.1", @@ -89,30 +89,30 @@ "@babel/core": "7.12.10", "@babel/preset-env": "7.12.11", "@babel/types": "7.12.12", - "@glimmer/reference": "0.73.1", + "@glimmer/reference": "0.73.2", "@rollup/plugin-alias": "3.1.1", "@rollup/plugin-babel": "5.2.2", "@rollup/plugin-commonjs": "16.0.0", "@rollup/plugin-json": "4.1.0", - "@rollup/plugin-node-resolve": "11.0.1", + "@rollup/plugin-node-resolve": "11.1.0", "@rollup/plugin-replace": "2.3.4", - "@types/estree": "0.0.45", + "@types/estree": "0.0.46", "@types/node": "14.14.0", - "@typescript-eslint/types": "4.12.0", + "@typescript-eslint/types": "4.14.0", "babel-jest": "26.6.3", "babel-loader": "8.2.2", "benchmark": "2.1.4", "builtin-modules": "3.2.0", "cross-env": "7.0.3", "cspell": "4.2.5", - "eslint": "7.17.0", - "eslint-config-prettier": "7.1.0", + "eslint": "7.18.0", + "eslint-config-prettier": "7.2.0", "eslint-formatter-friendly": "7.0.0", "eslint-plugin-import": "2.22.1", "eslint-plugin-jest": "24.1.3", "eslint-plugin-prettier-internal-rules": "link:scripts/tools/eslint-plugin-prettier-internal-rules", "eslint-plugin-react": "7.22.0", - "eslint-plugin-unicorn": "25.0.1", + "eslint-plugin-unicorn": "26.0.1", "execa": "5.0.0", "jest": "26.6.3", "jest-snapshot-serializer-ansi": "1.0.0", @@ -123,7 +123,7 @@ "prettier": "2.2.1", "pretty-bytes": "5.5.0", "rimraf": "3.0.2", - "rollup": "2.36.1", + "rollup": "2.37.1", "rollup-plugin-node-globals": "1.4.0", "rollup-plugin-terser": "7.0.2", "shelljs": "0.8.4", diff --git a/src/common/util.js b/src/common/util.js index 4551aba63..ca986ee3b 100644 --- a/src/common/util.js +++ b/src/common/util.js @@ -628,6 +628,20 @@ function isNonEmptyArray(object) { return Array.isArray(object) && object.length > 0; } +/** + * @param {string} description + * @returns {(node: any) => symbol} + */ +function createGroupIdMapper(description) { + const groupIds = new WeakMap(); + return function (node) { + if (!groupIds.has(node)) { + groupIds.set(node, Symbol(description)); + } + return groupIds.get(node); + }; +} + module.exports = { inferParserByLanguage, replaceEndOfLineWith, @@ -665,4 +679,5 @@ module.exports = { isFrontMatterNode, getShebang, isNonEmptyArray, + createGroupIdMapper, }; diff --git a/src/document/doc-printer.js b/src/document/doc-printer.js index 1498109e8..a425012eb 100644 --- a/src/document/doc-printer.js +++ b/src/document/doc-printer.js @@ -130,7 +130,7 @@ function trim(out) { while ( out.length > 0 && typeof out[out.length - 1] === "string" && - out[out.length - 1].match(/^[\t ]*$/) + /^[\t ]*$/.test(out[out.length - 1]) ) { trimCount += out.pop().length; } diff --git a/src/language-handlebars/printer-glimmer.js b/src/language-handlebars/printer-glimmer.js index 26d1c5d25..50092ce7f 100644 --- a/src/language-handlebars/printer-glimmer.js +++ b/src/language-handlebars/printer-glimmer.js @@ -1,15 +1,18 @@ "use strict"; const { - builders: { group, hardline, ifBreak, indent, join, line, softline }, + builders: { dedent, group, hardline, ifBreak, indent, join, line, softline }, utils: { getDocParts }, } = require("../document"); +const { isNonEmptyArray } = require("../common/util"); + const { locStart, locEnd } = require("./loc"); const clean = require("./clean"); const { getNextNode, getPreviousNode, hasPrettierIgnore, + isLastNodeOfSiblings, isNextNodeOfSomeType, isNodeOfSomeType, isParentOfSomeType, @@ -39,28 +42,44 @@ function print(path, options, print) { case "Template": { return group(path.map(print, "body")); } + case "ElementNode": { - // TODO: make it whitespace sensitive - const bim = isNextNodeOfSomeType(path, ["ElementNode"]) ? hardline : ""; + const startingTag = group(printStartingTag(path, print)); + + const escapeNextElementNode = + options.htmlWhitespaceSensitivity !== "strict" && + isNextNodeOfSomeType(path, ["ElementNode"]) + ? softline + : ""; if (isVoid(n)) { - return [group(printStartingTag(path, print)), bim]; + return [startingTag, escapeNextElementNode]; } - const isWhitespaceOnly = n.children.every((n) => isWhitespaceNode(n)); + const endingTag = [""]; + + if (n.children.length === 0) { + return [startingTag, indent(endingTag), escapeNextElementNode]; + } + + if (options.htmlWhitespaceSensitivity !== "strict") { + return [ + startingTag, + indent(printChildren(path, options, print)), + hardline, + indent(endingTag), + escapeNextElementNode, + ]; + } return [ - group(printStartingTag(path, print)), - group([ - isWhitespaceOnly ? "" : indent(printChildren(path, options, print)), - n.children.length > 0 ? hardline : "", - "", - ]), - bim, + startingTag, + indent(group(printChildren(path, options, print))), + indent(endingTag), + escapeNextElementNode, ]; } + case "BlockStatement": { const pp = path.getParentNode(1); @@ -74,20 +93,21 @@ function print(path, options, print) { if (isElseIf) { return [ printElseIfBlock(path, print), - printProgram(path, print), - printInverse(path, print), + printProgram(path, print, options), + printInverse(path, print, options), ]; } return [ printOpenBlock(path, print), group([ - printProgram(path, print), - printInverse(path, print), - printCloseBlock(path, print), + printProgram(path, print, options), + printInverse(path, print, options), + printCloseBlock(path, print, options), ]), ]; } + case "ElementModifierStatement": { return group(["{{", printPathAndParams(path, print), softline, "}}"]); } @@ -158,6 +178,65 @@ function print(path, options, print) { return [n.key, "=", path.call(print, "value")]; } case "TextNode": { + const inAttrNode = path.stack.includes("attributes"); + + if (options.htmlWhitespaceSensitivity === "strict" && !inAttrNode) { + // https://infra.spec.whatwg.org/#ascii-whitespace + const leadingWhitespacesRE = /^[\t\n\f\r ]*/; + const trailingWhitespacesRE = /[\t\n\f\r ]*$/; + const whitespacesOnlyRE = /^[\t\n\f\r ]*$/; + + if (whitespacesOnlyRE.test(n.chars)) { + let breaks = [line]; + + const newlines = countNewLines(n.chars); + if (newlines) { + breaks = generateHardlines(newlines, 2); + } + + if (isLastNodeOfSiblings(path)) { + breaks = breaks.map((newline) => dedent(newline)); + } + + return breaks; + } + + const [lead] = n.chars.match(leadingWhitespacesRE); + const [tail] = n.chars.match(trailingWhitespacesRE); + + let text = n.chars; + + let leadBreaks = []; + if (lead) { + leadBreaks = [line]; + + const leadingNewlines = countNewLines(lead); + if (leadingNewlines) { + leadBreaks = generateHardlines(countNewLines(lead) || 1, 2); + } + + text = text.replace(leadingWhitespacesRE, ""); + } + + let trailBreaks = []; + if (tail) { + trailBreaks = [line]; + + const trailingNewlines = countNewLines(tail); + if (trailingNewlines) { + trailBreaks = generateHardlines(trailingNewlines || 1, 2); + + if (isLastNodeOfSiblings(path)) { + trailBreaks = trailBreaks.map((hardline) => dedent(hardline)); + } + } + + text = text.replace(trailingWhitespacesRE, ""); + } + + return [...leadBreaks, text, ...trailBreaks]; + } + const maxLineBreaksToPreserve = 2; const isFirstElement = !getPreviousNode(path); const isLastElement = !getNextNode(path); @@ -191,10 +270,8 @@ function print(path, options, print) { } } - const inAttrNode = path.stack.includes("attributes"); if (inAttrNode) { // TODO: format style and srcset attributes - // and cleanup concat that is not necessary if (!isInAttributeOfName(path, "class")) { return n.chars; } @@ -318,37 +395,50 @@ function print(path, options, print) { function printStartingTag(path, print) { const node = path.getValue(); + const attributesLike = []; + if (isNonEmptyArray(node.attributes)) { + const attributes = join(line, path.map(print, "attributes")); + attributesLike.push(line, attributes); + } + + if (isNonEmptyArray(node.modifiers)) { + const modifiers = join(line, path.map(print, "modifiers")); + attributesLike.push(line, modifiers); + } + + if (isNonEmptyArray(node.comments)) { + const comments = join(line, path.map(print, "comments")); + attributesLike.push(line, comments); + } + + if (isNonEmptyArray(node.blockParams)) { + const blockParams = printBlockParams(node); + attributesLike.push(line, blockParams); + } + return [ "<", node.tag, - printAttributesLike(path, print), - printBlockParams(node), + indent(attributesLike), printStartingTagEndMarker(node), ]; } -function printAttributesLike(path, print) { - const node = path.getValue(); - - return indent([ - node.attributes.length > 0 ? line : "", - join(line, path.map(print, "attributes")), - - node.modifiers.length > 0 ? line : "", - join(line, path.map(print, "modifiers")), - - node.comments.length > 0 ? line : "", - join(line, path.map(print, "comments")), - ]); -} - function printChildren(path, options, print) { + const node = path.getValue(); + const isEmpty = node.children.every((n) => isWhitespaceNode(n)); + if (options.htmlWhitespaceSensitivity !== "strict" && isEmpty) { + return ""; + } + return path.map((childPath, childIndex) => { - if (childIndex === 0) { - return [softline, print(childPath, options, print)]; + const printedChild = print(childPath, options, print); + + if (childIndex === 0 && options.htmlWhitespaceSensitivity !== "strict") { + return [softline, printedChild]; } - return print(childPath, options, print); + return printedChild; }, "children"); } @@ -415,18 +505,32 @@ function printInverseBlockClosingMustache(node) { function printOpenBlock(path, print) { const node = path.getValue(); + const openingMustache = printOpeningBlockOpeningMustache(node); + const closingMustache = printOpeningBlockClosingMustache(node); + + const attributes = [printPath(path, print)]; + + const params = printParams(path, print); + if (params) { + attributes.push(line, params); + } + + if (isNonEmptyArray(node.program.blockParams)) { + const block = printBlockParams(node.program); + attributes.push(line, block); + } + return group([ - printOpeningBlockOpeningMustache(node), - printPathAndParams(path, print), - printBlockParams(node.program), + openingMustache, + indent(group(attributes)), softline, - printOpeningBlockClosingMustache(node), + closingMustache, ]); } -function printElseBlock(node) { +function printElseBlock(node, options) { return [ - hardline, + options.htmlWhitespaceSensitivity !== "strict" ? hardline : "", printInverseBlockOpeningMustache(node), "else", printInverseBlockClosingMustache(node), @@ -444,11 +548,23 @@ function printElseIfBlock(path, print) { ]; } -function printCloseBlock(path, print) { +function printCloseBlock(path, print, options) { const node = path.getValue(); + if (options.htmlWhitespaceSensitivity !== "strict") { + const escape = blockStatementHasOnlyWhitespaceInProgram(node) + ? softline + : hardline; + + return [ + escape, + printClosingBlockOpeningMustache(node), + path.call(print, "path"), + printClosingBlockClosingMustache(node), + ]; + } + return [ - blockStatementHasOnlyWhitespaceInProgram(node) ? softline : hardline, printClosingBlockOpeningMustache(node), path.call(print, "path"), printClosingBlockClosingMustache(node), @@ -475,7 +591,7 @@ function blockStatementHasElse(node) { return isNodeOfSomeType(node, ["BlockStatement"]) && node.inverse; } -function printProgram(path, print) { +function printProgram(path, print, options) { const node = path.getValue(); if (blockStatementHasOnlyWhitespaceInProgram(node)) { @@ -483,21 +599,29 @@ function printProgram(path, print) { } const program = path.call(print, "program"); - return indent([hardline, program]); + + if (options.htmlWhitespaceSensitivity !== "strict") { + return indent([hardline, program]); + } + + return indent(program); } -function printInverse(path, print) { +function printInverse(path, print, options) { const node = path.getValue(); const inverse = path.call(print, "inverse"); - const parts = [hardline, inverse]; + const printed = + options.htmlWhitespaceSensitivity !== "strict" + ? [hardline, inverse] + : inverse; if (blockStatementHasElseIf(node)) { - return parts; + return printed; } if (blockStatementHasElse(node)) { - return [printElseBlock(node), indent(parts)]; + return [printElseBlock(node, options), indent(printed)]; } return ""; @@ -634,11 +758,7 @@ function printParams(path, print) { } function printBlockParams(node) { - if (!node || node.blockParams.length === 0) { - return ""; - } - - return [" as |", node.blockParams.join(" "), "|"]; + return ["as |", node.blockParams.join(" "), "|"]; } function doesNotHaveHashParams(node) { diff --git a/src/language-handlebars/utils.js b/src/language-handlebars/utils.js index c7b20c3d4..7b41711cb 100644 --- a/src/language-handlebars/utils.js +++ b/src/language-handlebars/utils.js @@ -2,6 +2,27 @@ const htmlVoidElements = require("html-void-elements"); +function isLastNodeOfSiblings(path) { + const node = path.getValue(); + const parentNode = path.getParentNode(0); + + if ( + isParentOfSomeType(path, ["ElementNode"]) && + parentNode.children[parentNode.children.length - 1] === node + ) { + return true; + } + + if ( + isParentOfSomeType(path, ["Block"]) && + parentNode.body[parentNode.body.length - 1] === node + ) { + return true; + } + + return false; +} + function isUppercase(string) { return string.toUpperCase() === string; } @@ -83,6 +104,7 @@ module.exports = { getNextNode, getPreviousNode, hasPrettierIgnore, + isLastNodeOfSiblings, isNextNodeOfSomeType, isNodeOfSomeType, isParentOfSomeType, diff --git a/src/language-html/syntax-attribute.js b/src/language-html/syntax-attribute.js index bc2802a32..3180ae3b2 100644 --- a/src/language-html/syntax-attribute.js +++ b/src/language-html/syntax-attribute.js @@ -2,7 +2,7 @@ const parseSrcset = require("parse-srcset"); const { - builders: { ifBreak, join, line }, + builders: { group, ifBreak, indent, join, line, softline }, } = require("../document"); function printImgSrcset(value) { @@ -59,8 +59,50 @@ function printImgSrcset(value) { ); } +const prefixDelimiters = ["__", "--", "_", "-"]; + +function getClassPrefix(className) { + const startIndex = className.search(/[^_-]/); + if (startIndex !== -1) { + for (const delimiter of prefixDelimiters) { + const delimiterIndex = className.indexOf(delimiter, startIndex); + if (delimiterIndex !== -1) { + return className.slice(0, delimiterIndex); + } + } + } + return className; +} + function printClassNames(value) { - return value.trim().split(/\s+/).join(" "); + const classNames = value.trim().split(/\s+/); + + // Try keeping consecutive classes with the same prefix on one line. + const groupedByPrefix = []; + let previousPrefix; + for (let i = 0; i < classNames.length; i++) { + const prefix = getClassPrefix(classNames[i]); + if ( + prefix !== previousPrefix && + // "home-link" and "home-link_blue_yes" should be considered same-prefix + prefix !== classNames[i - 1] + ) { + groupedByPrefix.push([]); + } + groupedByPrefix[groupedByPrefix.length - 1].push(classNames[i]); + previousPrefix = prefix; + } + + return [ + indent([ + softline, + join( + line, + groupedByPrefix.map((classNames) => group(join(line, classNames))) + ), + ]), + softline, + ]; } module.exports = { diff --git a/src/language-js/clean.js b/src/language-js/clean.js index 5fbfcc0b6..9ff115bc1 100644 --- a/src/language-js/clean.js +++ b/src/language-js/clean.js @@ -68,7 +68,7 @@ function clean(ast, newObj, parent) { ast.type === "MethodDefinition" || ast.type === "ClassProperty" || ast.type === "ClassMethod" || - ast.type === "FieldDefinition" || + ast.type === "PropertyDefinition" || ast.type === "TSDeclareMethod" || ast.type === "TSPropertySignature" || ast.type === "ObjectTypeProperty") && diff --git a/src/language-js/comments.js b/src/language-js/comments.js index a63fb08cc..e4e0caa09 100644 --- a/src/language-js/comments.js +++ b/src/language-js/comments.js @@ -459,7 +459,7 @@ function handleMethodNameComments({ precedingNode.type === "Decorator" && (enclosingNode.type === "ClassMethod" || enclosingNode.type === "ClassProperty" || - enclosingNode.type === "FieldDefinition" || + enclosingNode.type === "PropertyDefinition" || enclosingNode.type === "TSAbstractClassProperty" || enclosingNode.type === "TSAbstractMethodDefinition" || enclosingNode.type === "TSDeclareMethod" || diff --git a/src/language-js/needs-parens.js b/src/language-js/needs-parens.js index 044b010ba..fccf92ca4 100644 --- a/src/language-js/needs-parens.js +++ b/src/language-js/needs-parens.js @@ -495,7 +495,7 @@ function needsParens(path, options) { } else if ( name === "key" && (parent.type === "ClassProperty" || - parent.type === "FieldDefinition") && + parent.type === "PropertyDefinition") && parent.computed ) { return false; @@ -747,7 +747,7 @@ function isStatement(node) { node.type === "ClassDeclaration" || node.type === "ClassMethod" || node.type === "ClassProperty" || - node.type === "FieldDefinition" || + node.type === "PropertyDefinition" || node.type === "ClassPrivateProperty" || node.type === "ContinueStatement" || node.type === "DebuggerStatement" || diff --git a/src/language-js/parser-babel.js b/src/language-js/parser-babel.js index 9abcc93e9..c778462b3 100644 --- a/src/language-js/parser-babel.js +++ b/src/language-js/parser-babel.js @@ -164,6 +164,9 @@ const messagesShouldThrow = new Set([ // FlowErrors.UnexpectedTypeParameterBeforeAsyncArrowFunction // https://github.com/babel/babel/blob/a023b6456cac4505096028f91c5b78829955bfc2/packages/babel-parser/src/plugins/flow.js#L118 "Type parameters must come after the async keyword, e.g. instead of ` async () => {}`, use `async () => {}`", + // Rethrow on omitted call arguments: foo("a", , "b"); + // ErrorMessages.UnexpectedToken + "Unexpected token ','", ]); function shouldRethrowRecoveredError(error) { diff --git a/src/language-js/print/binaryish.js b/src/language-js/print/binaryish.js index f9c34b881..c38235cbd 100644 --- a/src/language-js/print/binaryish.js +++ b/src/language-js/print/binaryish.js @@ -97,7 +97,7 @@ function printBinaryishExpression(path, options, print) { parent.type === "AssignmentExpression" || parent.type === "VariableDeclarator" || parent.type === "ClassProperty" || - parent.type === "FieldDefinition" || + parent.type === "PropertyDefinition" || parent.type === "TSAbstractClassProperty" || parent.type === "ClassPrivateProperty" || parent.type === "ObjectProperty" || diff --git a/src/language-js/print/block.js b/src/language-js/print/block.js index 09a349bf0..46c5f714f 100644 --- a/src/language-js/print/block.js +++ b/src/language-js/print/block.js @@ -6,6 +6,7 @@ const { builders: { hardline, indent }, } = require("../../document"); const { hasComment, CommentCheckFlags, isNextLineEmpty } = require("../utils"); +const { printHardlineAfterHeritage } = require("./class"); const { printBody } = require("./statement"); @@ -19,6 +20,11 @@ function printBlock(path, options, print) { parts.push("static "); } + if (node.type === "ClassBody" && isNonEmptyArray(node.body)) { + const parent = path.getParentNode(); + parts.push(printHardlineAfterHeritage(parent)); + } + parts.push("{"); const printed = printBlockBody(path, options, print); if (printed) { diff --git a/src/language-js/print/class.js b/src/language-js/print/class.js index bd1962b68..b08763dec 100644 --- a/src/language-js/print/class.js +++ b/src/language-js/print/class.js @@ -1,6 +1,6 @@ "use strict"; -const { isNonEmptyArray } = require("../../common/util"); +const { isNonEmptyArray, createGroupIdMapper } = require("../../common/util"); const { printComments, printDanglingComments } = require("../../main/comments"); const { builders: { join, line, hardline, softline, group, indent, ifBreak }, @@ -72,15 +72,16 @@ function printClass(path, options, print) { if (groupMode) { const printedExtends = extendsParts; + let printedPartsGroup; if (shouldIndentOnlyHeritageClauses(n)) { - parts.push( - group( - partsGroup.concat(ifBreak(indent(printedExtends), printedExtends)) - ) - ); + printedPartsGroup = [ + ...partsGroup, + ifBreak(indent(printedExtends), printedExtends), + ]; } else { - parts.push(group(indent(partsGroup.concat(printedExtends)))); + printedPartsGroup = indent([...partsGroup, printedExtends]); } + parts.push(group(printedPartsGroup, { id: getHeritageGroupId(n) })); } else { parts.push(...partsGroup, ...extendsParts); } @@ -90,6 +91,12 @@ function printClass(path, options, print) { return parts; } +const getHeritageGroupId = createGroupIdMapper("heritageGroup"); + +function printHardlineAfterHeritage(node) { + return ifBreak(hardline, "", { groupId: getHeritageGroupId(node) }); +} + function hasMultipleHeritage(node) { return ( ["superClass", "extends", "mixins", "implements"].filter( @@ -222,4 +229,5 @@ module.exports = { printClass, printClassMethod, printClassProperty, + printHardlineAfterHeritage, }; diff --git a/src/language-js/print/object.js b/src/language-js/print/object.js index 222bb441f..c84307f46 100644 --- a/src/language-js/print/object.js +++ b/src/language-js/print/object.js @@ -4,7 +4,12 @@ const { printDanglingComments } = require("../../main/comments"); const { builders: { line, softline, group, indent, ifBreak, hardline }, } = require("../../document"); -const { getLast, hasNewlineInRange, hasNewline } = require("../../common/util"); +const { + getLast, + hasNewlineInRange, + hasNewline, + isNonEmptyArray, +} = require("../../common/util"); const { shouldPrintComma, hasComment, @@ -17,6 +22,7 @@ const { locStart, locEnd } = require("../loc"); const { printOptionalToken, printTypeAnnotation } = require("./misc"); const { shouldHugFunctionParameters } = require("./function-parameters"); const { shouldHugType } = require("./type-annotation"); +const { printHardlineAfterHeritage } = require("./class"); /** @typedef {import("../../document").Doc} Doc */ @@ -175,6 +181,9 @@ function printObject(path, options, print) { ]); } else { content = [ + isFlowInterfaceLikeBody && isNonEmptyArray(n.properties) + ? printHardlineAfterHeritage(parent) + : "", leftBrace, indent([options.bracketSpacing ? line : softline, ...props]), ifBreak( diff --git a/src/language-js/print/property.js b/src/language-js/print/property.js index fa81565a3..e6f8c21d2 100644 --- a/src/language-js/print/property.js +++ b/src/language-js/print/property.js @@ -23,11 +23,8 @@ function printPropertyKey(path, options, print) { const parent = path.getParentNode(); const { key } = node; - if ( - node.type === "ClassPrivateProperty" && - // flow has `Identifier` key, and babel has `PrivateName` key - key.type === "Identifier" - ) { + // flow has `Identifier` key, other parsers use `PrivateIdentifier` (ESTree) or `PrivateName` + if (node.type === "ClassPrivateProperty" && key.type === "Identifier") { return ["#", path.call(print, "key")]; } diff --git a/src/language-js/print/statement.js b/src/language-js/print/statement.js index d03c8b314..8c15f1e1b 100644 --- a/src/language-js/print/statement.js +++ b/src/language-js/print/statement.js @@ -1,6 +1,5 @@ "use strict"; -const { getLast } = require("../../common/util"); const { builders: { hardline }, } = require("../../document"); @@ -25,9 +24,7 @@ function printStatementSequence(path, options, print, property) { const node = path.getValue(); const parts = []; const isClassBody = node.type === "ClassBody"; - const lastStatement = getLast( - node[property].filter(({ type }) => type !== "EmptyStatement") - ); + const lastStatement = getLastStatement(node[property]); path.each((path, index, statements) => { const node = path.getValue(); @@ -62,7 +59,7 @@ function printStatementSequence(path, options, print, property) { parts.push(";"); } else if ( node.type === "ClassProperty" || - node.type === "FieldDefinition" + node.type === "PropertyDefinition" ) { // `ClassBody` don't allow `EmptyStatement`, // so we can use `statements` to get next node @@ -84,6 +81,15 @@ function printStatementSequence(path, options, print, property) { return parts; } +function getLastStatement(statements) { + for (let i = statements.length - 1; i >= 0; i--) { + const statement = statements[i]; + if (statement.type !== "EmptyStatement") { + return statement; + } + } +} + function statementNeedsASIProtection(path, options) { const node = path.getNode(); @@ -145,7 +151,7 @@ function printSwitchCaseConsequent(path, options, print) { * @returns {boolean} */ function classPropMayCauseASIProblems(node) { - if (node.type !== "ClassProperty" && node.type !== "FieldDefinition") { + if (node.type !== "ClassProperty" && node.type !== "PropertyDefinition") { return false; } @@ -187,7 +193,7 @@ function classChildNeedsASIProtection(node) { } switch (node.type) { case "ClassProperty": - case "FieldDefinition": + case "PropertyDefinition": case "TSAbstractClassProperty": return node.computed; case "MethodDefinition": // Flow diff --git a/src/language-js/print/type-parameters.js b/src/language-js/print/type-parameters.js index 15df513f8..98f2477a9 100644 --- a/src/language-js/print/type-parameters.js +++ b/src/language-js/print/type-parameters.js @@ -12,15 +12,10 @@ const { shouldPrintComma, getFunctionParameters, } = require("../utils"); +const { createGroupIdMapper } = require("../../common/util"); const { shouldHugType } = require("./type-annotation"); -const typeParametersGroupIds = new WeakMap(); -function getTypeParametersGroupId(node) { - if (!typeParametersGroupIds.has(node)) { - typeParametersGroupIds.set(node, Symbol("typeParameters")); - } - return typeParametersGroupIds.get(node); -} +const getTypeParametersGroupId = createGroupIdMapper("typeParameters"); function printTypeParameters(path, options, print, paramsKey) { const n = path.getValue(); diff --git a/src/language-js/printer-estree.js b/src/language-js/printer-estree.js index cd80d2983..456c069d5 100644 --- a/src/language-js/printer-estree.js +++ b/src/language-js/printer-estree.js @@ -109,7 +109,7 @@ function genericPrint(path, options, printPath, args) { node.type === "ClassMethod" || node.type === "ClassPrivateMethod" || node.type === "ClassProperty" || - node.type === "FieldDefinition" || + node.type === "PropertyDefinition" || node.type === "TSAbstractClassProperty" || node.type === "ClassPrivateProperty" || node.type === "MethodDefinition" || @@ -836,7 +836,7 @@ function printPathNoParens(path, options, print, args) { case "MethodDefinition": return printClassMethod(path, options, print); case "ClassProperty": - case "FieldDefinition": + case "PropertyDefinition": case "ClassPrivateProperty": return printClassProperty(path, options, print); case "TemplateElement": @@ -1090,9 +1090,10 @@ function printPathNoParens(path, options, print, args) { case "TSThisType": return "this"; + case "PrivateIdentifier": + return ["#", path.call(print, "name")]; case "PrivateName": - // babel use `id`, meriyah use `name` - return ["#", path.call(print, n.id ? "id" : "name")]; + return ["#", path.call(print, "id")]; case "InterpreterDirective": parts.push("#!", n.value, hardline); diff --git a/src/language-js/utils.js b/src/language-js/utils.js index 36e7abf2c..415816d3d 100644 --- a/src/language-js/utils.js +++ b/src/language-js/utils.js @@ -834,18 +834,16 @@ function isFunctionCompositionArgs(args) { } let count = 0; for (const arg of args) { - if (arg) { - if (isFunctionOrArrowExpression(arg)) { - count += 1; - if (count > 1) { + if (isFunctionOrArrowExpression(arg)) { + count += 1; + if (count > 1) { + return true; + } + } else if (isCallOrOptionalCallExpression(arg)) { + for (const childArg of arg.arguments) { + if (isFunctionOrArrowExpression(childArg)) { return true; } - } else if (isCallOrOptionalCallExpression(arg)) { - for (const childArg of arg.arguments) { - if (isFunctionOrArrowExpression(childArg)) { - return true; - } - } } } } @@ -907,6 +905,7 @@ function isSimpleCallArgument(node, depth) { node.type === "ThisExpression" || node.type === "Super" || node.type === "PrivateName" || + node.type === "PrivateIdentifier" || node.type === "ArgumentPlaceholder" || node.type === "Import" ) { diff --git a/src/language-markdown/mdx.js b/src/language-markdown/mdx.js index 70d3087f4..273dd85de 100644 --- a/src/language-markdown/mdx.js +++ b/src/language-markdown/mdx.js @@ -27,7 +27,7 @@ const IMPORT_REGEX = /^import\s/; const EXPORT_REGEX = /^export\s/; const BLOCKS_REGEX = "[a-z][a-z0-9]*(\\.[a-z][a-z0-9]*)*|"; -const COMMENT_REGEX = "|"; +const COMMENT_REGEX = /|/; const EMPTY_NEWLINE = "\n\n"; const isImport = (text) => IMPORT_REGEX.test(text); diff --git a/src/language-markdown/parser-markdown.js b/src/language-markdown/parser-markdown.js index 32499bd34..67008abaf 100644 --- a/src/language-markdown/parser-markdown.js +++ b/src/language-markdown/parser-markdown.js @@ -52,7 +52,7 @@ function htmlToJsx() { mapAst(ast, (node, _index, [parent]) => { if ( node.type !== "html" || - node.value.match(mdx.COMMENT_REGEX) || + mdx.COMMENT_REGEX.test(node.value) || INLINE_NODE_WRAPPER_TYPES.includes(parent.type) ) { return node; diff --git a/src/language-markdown/printer-markdown.js b/src/language-markdown/printer-markdown.js index 14fefd4c8..3f008dac9 100644 --- a/src/language-markdown/printer-markdown.js +++ b/src/language-markdown/printer-markdown.js @@ -721,7 +721,7 @@ function printChildren(path, options, print, events) { options, }; - if (!shouldNotPrePrintHardline(childNode, data)) { + if (shouldPrePrintHardline(childNode, data)) { parts.push(hardline); // Can't find a case to pass `shouldPrePrintTripleHardline` @@ -772,7 +772,7 @@ function isPrettierIgnore(node) { return match === null ? false : match[1] ? match[1] : "next"; } -function shouldNotPrePrintHardline(node, data) { +function shouldPrePrintHardline(node, data) { const isFirstNode = data.parts.length === 0; const isInlineNode = INLINE_NODE_TYPES.includes(node.type); @@ -780,7 +780,7 @@ function shouldNotPrePrintHardline(node, data) { node.type === "html" && INLINE_NODE_WRAPPER_TYPES.includes(data.parentNode.type); - return isFirstNode || isInlineNode || isInlineHTML; + return !isFirstNode && !isInlineNode && !isInlineHTML; } function shouldPrePrintDoubleHardline(node, data) { diff --git a/tests/angular/angular/__snapshots__/jsfmt.spec.js.snap b/tests/angular/angular/__snapshots__/jsfmt.spec.js.snap index 2eb34a77d..437a6d4fb 100644 --- a/tests/angular/angular/__snapshots__/jsfmt.spec.js.snap +++ b/tests/angular/angular/__snapshots__/jsfmt.spec.js.snap @@ -110,7 +110,9 @@ printWidth: 1
{{ copyTypes[ @@ -8051,7 +8062,9 @@ can be found in the LICENSE file at http://angular.io/license

top @@ -8072,7 +8085,9 @@ can be found in the LICENSE file at http://angular.io/license [hidden]="isUnchanged")

{{ title @@ -8119,7 +8134,9 @@ can be found in the LICENSE file at http://angular.io/license (keyup)=" (0) " - class="context" + class=" + context + " > Type something: @@ -8132,7 +8149,9 @@ can be found in the LICENSE file at http://angular.io/license
top @@ -8154,7 +8173,9 @@ can be found in the LICENSE file at http://angular.io/license )

top @@ -8428,7 +8463,9 @@ can be found in the LICENSE file at http://angular.io/license /> top @@ -8505,7 +8542,9 @@ can be found in the LICENSE file at http://angular.io/license top @@ -8667,7 +8706,9 @@ can be found in the LICENSE file at http://angular.io/license

top @@ -8761,7 +8802,9 @@ can be found in the LICENSE file at http://angular.io/license
top @@ -8777,7 +8820,11 @@ can be found in the LICENSE file at http://angular.io/license
Bad curly @@ -8786,7 +8833,11 @@ can be found in the LICENSE file at http://angular.io/license
top @@ -8890,7 +8945,9 @@ can be found in the LICENSE file at http://angular.io/license top @@ -8964,7 +9021,9 @@ can be found in the LICENSE file at http://angular.io/license
Click me @@ -9022,7 +9083,9 @@ can be found in the LICENSE file at http://angular.io/license
top @@ -9079,7 +9142,9 @@ can be found in the LICENSE file at http://angular.io/license
top @@ -9151,7 +9216,9 @@ bindon-ngModel (ngModelChange)="setUppercaseName($event)" top @@ -9275,7 +9342,11 @@ bindon-ngModel
Bad curly @@ -9293,7 +9364,9 @@ bindon-ngModel
top @@ -9426,7 +9499,9 @@ bindon-ngModel
top @@ -9554,7 +9629,9 @@ bindon-ngModel
top @@ -9569,7 +9646,9 @@ bindon-ngModel
top @@ -9618,7 +9701,9 @@ bindon-ngModel separator

top @@ -9709,7 +9798,9 @@ bindon-ngModel trackBy

top @@ -9986,7 +10089,9 @@ bindon-ngModel
top @@ -10054,7 +10159,9 @@ bindon-ngModel > top @@ -10107,7 +10214,9 @@ bindon-ngModel }} top @@ -10185,7 +10294,9 @@ bindon-ngModel
top @@ -10282,7 +10393,9 @@ See console log:
top @@ -10319,7 +10432,9 @@ See console log:
top @@ -10371,7 +10486,9 @@ See console log:
top @@ -10433,7 +10550,9 @@ See console log:

top @@ -10456,13 +10575,17 @@ can be found in the LICENSE file at http://angular.io/license #heroForm="ngForm" >
=====================================output===================================== - + @@ -313,10 +516,34 @@ width="205px" alt="Yahoo"/>

================================================================================ `; +exports[`class-print-width-edge.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== + + +=====================================output===================================== + + +================================================================================ +`; + exports[`dobule-quotes.html format 1`] = ` ====================================options===================================== parsers: ["html"] diff --git a/tests/html/attributes/class-bem1.html b/tests/html/attributes/class-bem1.html new file mode 100644 index 000000000..66eba1c9b --- /dev/null +++ b/tests/html/attributes/class-bem1.html @@ -0,0 +1,10 @@ +
Foo
+ +
+
+
+
diff --git a/tests/html/attributes/class-bem2.html b/tests/html/attributes/class-bem2.html new file mode 100644 index 000000000..b1fa92d9d --- /dev/null +++ b/tests/html/attributes/class-bem2.html @@ -0,0 +1,21 @@ +
+
+

+ ... +

+
+
diff --git a/tests/html/attributes/class-leading-dashes.html b/tests/html/attributes/class-leading-dashes.html new file mode 100644 index 000000000..3520dc338 --- /dev/null +++ b/tests/html/attributes/class-leading-dashes.html @@ -0,0 +1,3 @@ + + + diff --git a/tests/html/attributes/class-many-short-names.html b/tests/html/attributes/class-many-short-names.html new file mode 100644 index 000000000..ac51d5aa1 --- /dev/null +++ b/tests/html/attributes/class-many-short-names.html @@ -0,0 +1,4 @@ + diff --git a/tests/html/attributes/class-print-width-edge.html b/tests/html/attributes/class-print-width-edge.html new file mode 100644 index 000000000..ecd71dd96 --- /dev/null +++ b/tests/html/attributes/class-print-width-edge.html @@ -0,0 +1,2 @@ + diff --git a/tests/html/tags/__snapshots__/jsfmt.spec.js.snap b/tests/html/tags/__snapshots__/jsfmt.spec.js.snap index 5e7a41abb..77ee9accb 100644 --- a/tests/html/tags/__snapshots__/jsfmt.spec.js.snap +++ b/tests/html/tags/__snapshots__/jsfmt.spec.js.snap @@ -3316,14 +3316,18 @@ printWidth: 1
    123
  • First
  • 456
  • Second
  • @@ -3465,13 +3469,25 @@ printWidth: 1
diff --git a/tests/html/whitespace/__snapshots__/jsfmt.spec.js.snap b/tests/html/whitespace/__snapshots__/jsfmt.spec.js.snap index 9441233f7..b3baa2d63 100644 --- a/tests/html/whitespace/__snapshots__/jsfmt.spec.js.snap +++ b/tests/html/whitespace/__snapshots__/jsfmt.spec.js.snap @@ -193,6 +193,50 @@ conubia nostra, per inceptos himenaeos. Donec in ornare velit.

================================================================================ `; +exports[`nested-inline-without-whitespace.html format 1`] = ` +====================================options===================================== +parsers: ["html"] +printWidth: 80 + | printWidth +=====================================input====================================== +/ˌɪləˈnɔɪ/ + +ipsum + +=====================================output===================================== +/ˌɪləˈnɔɪ/ + +ipsum + +================================================================================ +`; + exports[`non-breaking-whitespace.html format 1`] = ` ====================================options===================================== parsers: ["html"] diff --git a/tests/html/whitespace/nested-inline-without-whitespace.html b/tests/html/whitespace/nested-inline-without-whitespace.html new file mode 100644 index 000000000..824b0bf9d --- /dev/null +++ b/tests/html/whitespace/nested-inline-without-whitespace.html @@ -0,0 +1,10 @@ +/ˌɪləˈnɔɪ/ + +ipsum diff --git a/tests/js/call/invalid/__snapshots__/jsfmt.spec.js.snap b/tests/js/call/invalid/__snapshots__/jsfmt.spec.js.snap new file mode 100644 index 000000000..23947f3ac --- /dev/null +++ b/tests/js/call/invalid/__snapshots__/jsfmt.spec.js.snap @@ -0,0 +1,28 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`null-arguments-item.js [babel] format 1`] = ` +"Unexpected token ',' (1:12) +> 1 | foor('a', , 'b'); + | ^ + 2 | foo('looooooooooooooooooooooooooooooooooooooooooooooong', , 'looooooooooooooooooooooooooooooooooooooooooooooong'); + 3 | foo(\\"a\\", + 4 | //1" +`; + +exports[`null-arguments-item.js [espree] format 1`] = ` +"Unexpected token , (1:11) +> 1 | foor('a', , 'b'); + | ^ + 2 | foo('looooooooooooooooooooooooooooooooooooooooooooooong', , 'looooooooooooooooooooooooooooooooooooooooooooooong'); + 3 | foo(\\"a\\", + 4 | //1" +`; + +exports[`null-arguments-item.js [meriyah] format 1`] = ` +"[1:11]: Unexpected token: ',' (1:11) +> 1 | foor('a', , 'b'); + | ^ + 2 | foo('looooooooooooooooooooooooooooooooooooooooooooooong', , 'looooooooooooooooooooooooooooooooooooooooooooooong'); + 3 | foo(\\"a\\", + 4 | //1" +`; diff --git a/tests/js/call/null-arguments-item/jsfmt.spec.js b/tests/js/call/invalid/jsfmt.spec.js similarity index 84% rename from tests/js/call/null-arguments-item/jsfmt.spec.js rename to tests/js/call/invalid/jsfmt.spec.js index c57dff579..0142a0836 100644 --- a/tests/js/call/null-arguments-item/jsfmt.spec.js +++ b/tests/js/call/invalid/jsfmt.spec.js @@ -1,5 +1,6 @@ run_spec(__dirname, ["babel"], { errors: { + babel: true, espree: true, meriyah: true, }, diff --git a/tests/js/call/null-arguments-item/null-arguments-item.js b/tests/js/call/invalid/null-arguments-item.js similarity index 100% rename from tests/js/call/null-arguments-item/null-arguments-item.js rename to tests/js/call/invalid/null-arguments-item.js diff --git a/tests/js/call/null-arguments-item/__snapshots__/jsfmt.spec.js.snap b/tests/js/call/null-arguments-item/__snapshots__/jsfmt.spec.js.snap deleted file mode 100644 index a09473f69..000000000 --- a/tests/js/call/null-arguments-item/__snapshots__/jsfmt.spec.js.snap +++ /dev/null @@ -1,50 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`null-arguments-item.js [espree] format 1`] = ` -"Unexpected token , (1:11) -> 1 | foor('a', , 'b'); - | ^ - 2 | foo('looooooooooooooooooooooooooooooooooooooooooooooong', , 'looooooooooooooooooooooooooooooooooooooooooooooong'); - 3 | foo(\\"a\\", - 4 | //1" -`; - -exports[`null-arguments-item.js [meriyah] format 1`] = ` -"[1:11]: Unexpected token: ',' (1:11) -> 1 | foor('a', , 'b'); - | ^ - 2 | foo('looooooooooooooooooooooooooooooooooooooooooooooong', , 'looooooooooooooooooooooooooooooooooooooooooooooong'); - 3 | foo(\\"a\\", - 4 | //1" -`; - -exports[`null-arguments-item.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -foor('a', , 'b'); -foo('looooooooooooooooooooooooooooooooooooooooooooooong', , 'looooooooooooooooooooooooooooooooooooooooooooooong'); -foo("a", - //1 - , "b"); -foo("a", /* comment */, "b"); - -=====================================output===================================== -foor("a", , "b"); -foo( - "looooooooooooooooooooooooooooooooooooooooooooooong", - , - "looooooooooooooooooooooooooooooooooooooooooooooong" -); -foo( - "a", - , - //1 - "b" -); -foo("a" /* comment */, , "b"); - -================================================================================ -`; diff --git a/tests/js/class-comment/__snapshots__/jsfmt.spec.js.snap b/tests/js/class-comment/__snapshots__/jsfmt.spec.js.snap index 2496274a9..4eaeb76b6 100644 --- a/tests/js/class-comment/__snapshots__/jsfmt.spec.js.snap +++ b/tests/js/class-comment/__snapshots__/jsfmt.spec.js.snap @@ -146,7 +146,8 @@ class c extends d { } class C2 // comment - extends Base { + extends Base +{ foo() {} } diff --git a/tests/js/class-extends/__snapshots__/jsfmt.spec.js.snap b/tests/js/class-extends/__snapshots__/jsfmt.spec.js.snap index cad7690f8..8dcb70a92 100644 --- a/tests/js/class-extends/__snapshots__/jsfmt.spec.js.snap +++ b/tests/js/class-extends/__snapshots__/jsfmt.spec.js.snap @@ -1,5 +1,53 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`complex.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +class loooooooooooooooooooong1 extends foooooooo(foooooooo(foooooooo(foooooooo(foooooooo(foooooooo(foooooooo(foooooooo()))))))) {} + +class loooooooooooooooooooong2 extends function (make, model, year, owner) { + this.make = make; + this.model = model; + this.year = year; + this.owner = owner; +} {} + +class loooooooooooooooooooong3 extends class { + cconstructor(make, model, year, owner) { + this.make = make; + this.model = model; + this.year = year; + this.owner = owner; + } +} {} + +=====================================output===================================== +class loooooooooooooooooooong1 extends foooooooo( + foooooooo(foooooooo(foooooooo(foooooooo(foooooooo(foooooooo(foooooooo())))))) +) {} + +class loooooooooooooooooooong2 extends function (make, model, year, owner) { + this.make = make; + this.model = model; + this.year = year; + this.owner = owner; +} {} + +class loooooooooooooooooooong3 extends class { + cconstructor(make, model, year, owner) { + this.make = make; + this.model = model; + this.year = year; + this.owner = owner; + } +} {} + +================================================================================ +`; + exports[`extends.js format 1`] = ` ====================================options===================================== parsers: ["babel", "flow", "typescript"] diff --git a/tests/js/class-extends/complex.js b/tests/js/class-extends/complex.js new file mode 100644 index 000000000..0f5dd54a3 --- /dev/null +++ b/tests/js/class-extends/complex.js @@ -0,0 +1,17 @@ +class loooooooooooooooooooong1 extends foooooooo(foooooooo(foooooooo(foooooooo(foooooooo(foooooooo(foooooooo(foooooooo()))))))) {} + +class loooooooooooooooooooong2 extends function (make, model, year, owner) { + this.make = make; + this.model = model; + this.year = year; + this.owner = owner; +} {} + +class loooooooooooooooooooong3 extends class { + cconstructor(make, model, year, owner) { + this.make = make; + this.model = model; + this.year = year; + this.owner = owner; + } +} {} diff --git a/tests/js/generator/__snapshots__/jsfmt.spec.js.snap b/tests/js/generator/__snapshots__/jsfmt.spec.js.snap index 456ea8eb4..94804034a 100644 --- a/tests/js/generator/__snapshots__/jsfmt.spec.js.snap +++ b/tests/js/generator/__snapshots__/jsfmt.spec.js.snap @@ -51,3 +51,71 @@ const f3 = function* () {}; ================================================================================ `; + +exports[`async.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://github.com/meriyah/meriyah/commit/f21882c312284572ac6d7e7630c4a677d6caed92 + +const f = async function * (source, block, opts) { + for await (const entry of source) { + yield async function () { + const cid = await persist(entry.content.serialize(), block, opts) + return { + cid, + path: entry.path, + unixfs: UnixFS.unmarshal(entry.content.Data), + node: entry.content + } + } + } +} + +=====================================output===================================== +// https://github.com/meriyah/meriyah/commit/f21882c312284572ac6d7e7630c4a677d6caed92 + +const f = async function* (source, block, opts) { + for await (const entry of source) { + yield async function () { + const cid = await persist(entry.content.serialize(), block, opts); + return { + cid, + path: entry.path, + unixfs: UnixFS.unmarshal(entry.content.Data), + node: entry.content, + }; + }; + } +}; + +================================================================================ +`; + +exports[`function-name-starts-with-get.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "typescript", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +// https://github.com/meriyah/meriyah/issues/164 + +function get() {} + +function* getData() { + return yield get(); +} + +=====================================output===================================== +// https://github.com/meriyah/meriyah/issues/164 + +function get() {} + +function* getData() { + return yield get(); +} + +================================================================================ +`; diff --git a/tests/js/generator/async.js b/tests/js/generator/async.js new file mode 100644 index 000000000..82cff7044 --- /dev/null +++ b/tests/js/generator/async.js @@ -0,0 +1,15 @@ +// https://github.com/meriyah/meriyah/commit/f21882c312284572ac6d7e7630c4a677d6caed92 + +const f = async function * (source, block, opts) { + for await (const entry of source) { + yield async function () { + const cid = await persist(entry.content.serialize(), block, opts) + return { + cid, + path: entry.path, + unixfs: UnixFS.unmarshal(entry.content.Data), + node: entry.content + } + } + } +} diff --git a/tests/js/generator/function-name-starts-with-get.js b/tests/js/generator/function-name-starts-with-get.js new file mode 100644 index 000000000..e7f942866 --- /dev/null +++ b/tests/js/generator/function-name-starts-with-get.js @@ -0,0 +1,7 @@ +// https://github.com/meriyah/meriyah/issues/164 + +function get() {} + +function* getData() { + return yield get(); +} diff --git a/tests/js/tuple/__snapshots__/jsfmt.spec.js.snap b/tests/js/tuple/__snapshots__/jsfmt.spec.js.snap index 68255cd61..0f922022f 100644 --- a/tests/js/tuple/__snapshots__/jsfmt.spec.js.snap +++ b/tests/js/tuple/__snapshots__/jsfmt.spec.js.snap @@ -48,6 +48,13 @@ assert(rest[1] === 3); ================================================================================ `; +exports[`invalid-tuple-holes.js [babel] format 1`] = ` +"Unexpected token ',' (1:4) +> 1 | #[,] + | ^ + 2 | " +`; + exports[`invalid-tuple-holes.js [espree] format 1`] = ` "Unexpected character '#' (1:1) > 1 | #[,] @@ -62,20 +69,6 @@ exports[`invalid-tuple-holes.js [meriyah] format 1`] = ` 2 | " `; -exports[`invalid-tuple-holes.js format 1`] = ` -====================================options===================================== -parsers: ["babel"] -printWidth: 80 - | printWidth -=====================================input====================================== -#[,] - -=====================================output===================================== -#[,]; - -================================================================================ -`; - exports[`syntax.js [espree] format 1`] = ` "Unexpected character '#' (1:1) > 1 | #[] diff --git a/tests/js/tuple/jsfmt.spec.js b/tests/js/tuple/jsfmt.spec.js index 0fab4456d..71a06d090 100644 --- a/tests/js/tuple/jsfmt.spec.js +++ b/tests/js/tuple/jsfmt.spec.js @@ -1 +1,7 @@ -run_spec(__dirname, ["babel"], { errors: { espree: true, meriyah: true } }); +run_spec(__dirname, ["babel"], { + errors: { + babel: ["invalid-tuple-holes.js"], + espree: true, + meriyah: true, + }, +}); diff --git a/tests/js/yield/__snapshots__/jsfmt.spec.js.snap b/tests/js/yield/__snapshots__/jsfmt.spec.js.snap index 67e013e3b..58d9d153a 100644 --- a/tests/js/yield/__snapshots__/jsfmt.spec.js.snap +++ b/tests/js/yield/__snapshots__/jsfmt.spec.js.snap @@ -1,16 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`arrow.js [meriyah] format 1`] = ` -"[3:14]: Expected ')' (3:14) - 1 | function *f() { - 2 | (yield a => a); -> 3 | (yield async a => a); - | ^ - 4 | (yield async (a) => a); - 5 | } - 6 | " -`; - exports[`arrow.js format 1`] = ` ====================================options===================================== parsers: ["babel", "typescript"] diff --git a/tests/js/yield/jsfmt.spec.js b/tests/js/yield/jsfmt.spec.js index b5e48a428..858ac91aa 100644 --- a/tests/js/yield/jsfmt.spec.js +++ b/tests/js/yield/jsfmt.spec.js @@ -1,3 +1 @@ -run_spec(__dirname, ["babel", "typescript"], { - errors: { meriyah: ["arrow.js"] }, -}); +run_spec(__dirname, ["babel", "typescript"]); diff --git a/tests/typescript/class-comment/__snapshots__/jsfmt.spec.js.snap b/tests/typescript/class-comment/__snapshots__/jsfmt.spec.js.snap index e3639e298..b235d98a5 100644 --- a/tests/typescript/class-comment/__snapshots__/jsfmt.spec.js.snap +++ b/tests/typescript/class-comment/__snapshots__/jsfmt.spec.js.snap @@ -83,7 +83,8 @@ b // comment-b2 =====================================output===================================== class a1 extends b // comment - implements z { + implements z +{ constructor() {} } @@ -95,7 +96,8 @@ class a2 extends b implements z { class a3 extends b // comment - implements z, y { + implements z, y +{ constructor() {} } @@ -103,7 +105,8 @@ class a4 extends b implements z, // comment - y { + y +{ constructor() {} } @@ -111,7 +114,8 @@ class a5 extends b implements z, // comment-z - y { + y +{ // comment-y constructor() {} } @@ -122,7 +126,8 @@ class a6 implements z, // comment-z2 // comment-y1 - y { + y +{ // comment-y2 constructor() {} } @@ -133,7 +138,8 @@ class a7 implements z, // comment-z2 // comment-y1 - y { + y +{ // comment-y2 // comment-y3 //comment-body @@ -146,7 +152,8 @@ class a8 implements z, // comment-z2 // comment-y1 - y { + y +{ // comment-y2 constructor() {} } @@ -159,7 +166,8 @@ class a9 implements z, // comment-z2 // comment-y1 - y { + y +{ // comment-y2 constructor() {} } @@ -188,7 +196,8 @@ extends B // 3 =====================================output===================================== declare class a // 1 // extends b // 2 - implements z, x { + implements z, x +{ // 3 doo: boolean; } @@ -233,13 +242,15 @@ class G1 implements IPoly { } class G2 // g2 - implements IPoly { + implements IPoly +{ x: T; } class G3 // g3 extends U - implements IPoly { + implements IPoly +{ x: T; } @@ -247,7 +258,8 @@ class G4< T // g4 > extends U - implements IPoly { + implements IPoly +{ x: T; } diff --git a/tests/typescript/classes/__snapshots__/jsfmt.spec.js.snap b/tests/typescript/classes/__snapshots__/jsfmt.spec.js.snap index 867c4ec84..348f13462 100644 --- a/tests/typescript/classes/__snapshots__/jsfmt.spec.js.snap +++ b/tests/typescript/classes/__snapshots__/jsfmt.spec.js.snap @@ -45,7 +45,8 @@ export class VisTimelineComponent2 =====================================output===================================== class MyContractSelectionWidget extends React.Component - implements SomethingLarge { + implements SomethingLarge +{ method() {} } @@ -89,3 +90,63 @@ export class VisTimelineComponent2 ================================================================================ `; + +exports[`break-heritage.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript", "babel", "flow"] +printWidth: 80 + | printWidth +=====================================input====================================== +class loooooooooooooooooooong extends looooooooooooooooooong implements loooooooooooooooooooong { + // leading comment + property: string; +} + +class loooooooooooooooooooong extends looooooooooooooooooong implements loooooooooooooooooooong { + property: string; +} + +class loooooooooooooooooooong extends looooooooooooooooooong implements loooooooooooooooooooong { + + property: string; +} + +class loooooooooooooooooooong extends looooooooooooooooooong implements loooooooooooooooooooong, loooooooooooooooooooong, loooooooooooooooooooong { + property: string; +} + +=====================================output===================================== +class loooooooooooooooooooong + extends looooooooooooooooooong + implements loooooooooooooooooooong +{ + // leading comment + property: string; +} + +class loooooooooooooooooooong + extends looooooooooooooooooong + implements loooooooooooooooooooong +{ + property: string; +} + +class loooooooooooooooooooong + extends looooooooooooooooooong + implements loooooooooooooooooooong +{ + property: string; +} + +class loooooooooooooooooooong + extends looooooooooooooooooong + implements + loooooooooooooooooooong, + loooooooooooooooooooong, + loooooooooooooooooooong +{ + property: string; +} + +================================================================================ +`; diff --git a/tests/typescript/classes/break-heritage.ts b/tests/typescript/classes/break-heritage.ts new file mode 100644 index 000000000..e442f7517 --- /dev/null +++ b/tests/typescript/classes/break-heritage.ts @@ -0,0 +1,17 @@ +class loooooooooooooooooooong extends looooooooooooooooooong implements loooooooooooooooooooong { + // leading comment + property: string; +} + +class loooooooooooooooooooong extends looooooooooooooooooong implements loooooooooooooooooooong { + property: string; +} + +class loooooooooooooooooooong extends looooooooooooooooooong implements loooooooooooooooooooong { + + property: string; +} + +class loooooooooooooooooooong extends looooooooooooooooooong implements loooooooooooooooooooong, loooooooooooooooooooong, loooooooooooooooooooong { + property: string; +} diff --git a/website/package.json b/website/package.json index d4266e45a..86cfc2b1e 100644 --- a/website/package.json +++ b/website/package.json @@ -2,7 +2,7 @@ "license": "MIT", "scripts": { "build": "webpack && docusaurus-build", - "start": "concurrently \"docusaurus-start\" \"webpack -d -w\"", + "start": "concurrently \"docusaurus-start\" \"webpack --mode=development --watch\"", "svgo": "svgo --pretty --indent=2 --config=svgo.yml", "svgo-all": "find static | grep '\\.svg$' | xargs -Iz -n 1 yarn svgo z", "update-stable-docs": "rm -rf ./versioned_docs ./versions.json && docusaurus-version stable" @@ -21,9 +21,9 @@ "babel-loader": "8.2.2", "concurrently": "5.3.0", "docusaurus": "1.14.6", - "js-yaml": "3.14.1", + "js-yaml": "4.0.0", "svgo": "1.3.2", - "webpack": "5.11.1", + "webpack": "5.15.0", "webpack-cli": "4.3.1" } } diff --git a/website/playground/VersionLink.js b/website/playground/VersionLink.js index c8929c456..4a5a33939 100644 --- a/website/playground/VersionLink.js +++ b/website/playground/VersionLink.js @@ -8,7 +8,7 @@ export default function ({ version }) { let href; if (match) { href = `pull/${match[1]}`; - } else if (version.match(/\.0$/)) { + } else if (/\.0$/.test(version)) { href = `releases/tag/${version}`; } else { href = `blob/master/CHANGELOG.md#${version.replace(/\./g, "")}`; diff --git a/website/playground/markdown.js b/website/playground/markdown.js index 79e3ade45..e50065555 100644 --- a/website/playground/markdown.js +++ b/website/playground/markdown.js @@ -37,6 +37,7 @@ function getMarkdownSyntax(options) { case "babel-flow": case "flow": case "espree": + case "meriyah": return "jsx"; case "babel-ts": case "typescript": diff --git a/website/siteConfig.js b/website/siteConfig.js index 85f1d82d8..b05b342e0 100644 --- a/website/siteConfig.js +++ b/website/siteConfig.js @@ -4,7 +4,7 @@ const path = require("path"); const fs = require("fs"); -const parseYaml = require("js-yaml").safeLoad; +const { load: parseYaml } = require("js-yaml"); const PACKAGE = require("../package.json"); const GITHUB_URL = `https://github.com/${PACKAGE.repository}`; diff --git a/website/static/landing.js b/website/static/landing.js index a15d1d418..5a74e07cc 100644 --- a/website/static/landing.js +++ b/website/static/landing.js @@ -23,7 +23,7 @@ window.addEventListener("load", () => { logoWrapper.addEventListener("dragstart", handleLogoDrag); lastDash.addEventListener("animationend", (event) => { - if (event.animationName.match(/roll/)) { + if (/roll/.test(event.animationName)) { logo.classList.remove("rolling"); } }); diff --git a/website/versioned_docs/version-stable/rationale.md b/website/versioned_docs/version-stable/rationale.md index f858077a3..023a95d60 100644 --- a/website/versioned_docs/version-stable/rationale.md +++ b/website/versioned_docs/version-stable/rationale.md @@ -78,6 +78,10 @@ const user = { [stylesheets]: https://github.com/prettier/prettier/issues/74#issuecomment-275262094 [keyed methods]: https://github.com/prettier/prettier/pull/495#issuecomment-275745434 +> ♻️ **A note on formatting reversibility:** The semi-manual formatting for object literals is in fact a workaround, not a feature. It was implemented only because at the time a good heuristic wasn’t found and an urgent fix was needed. However, as a general strategy, Prettier avoids _non-reversible_ formatting like that, so the team is still looking for heuristics that would allow either to remove this behavior completely or at least to reduce the number of situations where it’s applied. +> +> What does **reversible** mean? Once an object literal becomes multiline, Prettier won’t collapse it back. If in Prettier-formatted code, we add a property to an object literal, run Prettier, then change our mind, remove the added property, and then run Prettier again, we might end up with a formatting not identical to the initial one. This useless change might even get included in a commit, which is exactly the kind of situation Prettier was created to prevent. + ### Decorators Just like with objects, decorators are used for a lot of different things. Sometimes it makes sense to write decorators _above_ the line they're decorating, sometimes it’s nicer if they're on the _same_ line. We haven’t been able to find a good rule for this, so Prettier keeps your decorator positioned like you wrote them (if they fit on the line). This isn’t ideal, but a pragmatic solution to a difficult problem. diff --git a/website/yarn.lock b/website/yarn.lock index 2bdf087c2..3101e3385 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -1101,149 +1101,125 @@ resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.2.tgz#690a1475b84f2a884fd07cd797c00f5f31356ea8" integrity sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw== -"@webassemblyjs/ast@1.9.1": - version "1.9.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.9.1.tgz#76c6937716d68bf1484c15139f5ed30b9abc8bb4" - integrity sha512-uMu1nCWn2Wxyy126LlGqRVlhdTOsO/bsBRI4dNq3+6SiSuRKRQX6ejjKgh82LoGAPSq72lDUiQ4FWVaf0PecYw== +"@webassemblyjs/ast@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.0.tgz#a5aa679efdc9e51707a4207139da57920555961f" + integrity sha512-kX2W49LWsbthrmIRMbQZuQDhGtjyqXfEmmHyEi4XWnSZtPmxY0+3anPIzsnRb45VH/J55zlOfWvZuY47aJZTJg== dependencies: - "@webassemblyjs/helper-module-context" "1.9.1" - "@webassemblyjs/helper-wasm-bytecode" "1.9.1" - "@webassemblyjs/wast-parser" "1.9.1" + "@webassemblyjs/helper-numbers" "1.11.0" + "@webassemblyjs/helper-wasm-bytecode" "1.11.0" -"@webassemblyjs/floating-point-hex-parser@1.9.1": - version "1.9.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.1.tgz#9eb0ff90a1cdeef51f36ba533ed9f06b5cdadd09" - integrity sha512-5VEKu024RySmLKTTBl9q1eO/2K5jk9ZS+2HXDBLA9s9p5IjkaXxWiDb/+b7wSQp6FRdLaH1IVGIfOex58Na2pg== +"@webassemblyjs/floating-point-hex-parser@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.0.tgz#34d62052f453cd43101d72eab4966a022587947c" + integrity sha512-Q/aVYs/VnPDVYvsCBL/gSgwmfjeCb4LW8+TMrO3cSzJImgv8lxxEPM2JA5jMrivE7LSz3V+PFqtMbls3m1exDA== -"@webassemblyjs/helper-api-error@1.9.1": - version "1.9.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.1.tgz#ad89015c4246cd7f5ed0556700237f8b9c2c752f" - integrity sha512-y1lGmfm38djrScwpeL37rRR9f1D6sM8RhMpvM7CYLzOlHVboouZokXK/G88BpzW0NQBSvCCOnW5BFhten4FPfA== +"@webassemblyjs/helper-api-error@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.0.tgz#aaea8fb3b923f4aaa9b512ff541b013ffb68d2d4" + integrity sha512-baT/va95eXiXb2QflSx95QGT5ClzWpGaa8L7JnJbgzoYeaA27FCvuBXU758l+KXWRndEmUXjP0Q5fibhavIn8w== -"@webassemblyjs/helper-buffer@1.9.1": - version "1.9.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.1.tgz#186e67ac25f9546ea7939759413987f157524133" - integrity sha512-uS6VSgieHbk/m4GSkMU5cqe/5TekdCzQso4revCIEQ3vpGZgqSSExi4jWpTWwDpAHOIAb1Jfrs0gUB9AA4n71w== +"@webassemblyjs/helper-buffer@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.0.tgz#d026c25d175e388a7dbda9694e91e743cbe9b642" + integrity sha512-u9HPBEl4DS+vA8qLQdEQ6N/eJQ7gT7aNvMIo8AAWvAl/xMrcOSiI2M0MAnMCy3jIFke7bEee/JwdX1nUpCtdyA== -"@webassemblyjs/helper-code-frame@1.9.1": - version "1.9.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.1.tgz#aab177b7cc87a318a8f8664ad68e2c3828ebc42b" - integrity sha512-ZQ2ZT6Evk4DPIfD+92AraGYaFIqGm4U20e7FpXwl7WUo2Pn1mZ1v8VGH8i+Y++IQpxPbQo/UyG0Khs7eInskzA== +"@webassemblyjs/helper-numbers@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.0.tgz#7ab04172d54e312cc6ea4286d7d9fa27c88cd4f9" + integrity sha512-DhRQKelIj01s5IgdsOJMKLppI+4zpmcMQ3XboFPLwCpSNH6Hqo1ritgHgD0nqHeSYqofA6aBN/NmXuGjM1jEfQ== dependencies: - "@webassemblyjs/wast-printer" "1.9.1" + "@webassemblyjs/floating-point-hex-parser" "1.11.0" + "@webassemblyjs/helper-api-error" "1.11.0" + "@xtuc/long" "4.2.2" -"@webassemblyjs/helper-fsm@1.9.1": - version "1.9.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.1.tgz#527e91628e84d13d3573884b3dc4c53a81dcb911" - integrity sha512-J32HGpveEqqcKFS0YbgicB0zAlpfIxJa5MjxDxhu3i5ltPcVfY5EPvKQ1suRguFPehxiUs+/hfkwPEXom/l0lw== +"@webassemblyjs/helper-wasm-bytecode@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.0.tgz#85fdcda4129902fe86f81abf7e7236953ec5a4e1" + integrity sha512-MbmhvxXExm542tWREgSFnOVo07fDpsBJg3sIl6fSp9xuu75eGz5lz31q7wTLffwL3Za7XNRCMZy210+tnsUSEA== -"@webassemblyjs/helper-module-context@1.9.1": - version "1.9.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.1.tgz#778670b3d471f7cf093d1e7c0dde431b54310e16" - integrity sha512-IEH2cMmEQKt7fqelLWB5e/cMdZXf2rST1JIrzWmf4XBt3QTxGdnnLvV4DYoN8pJjOx0VYXsWg+yF16MmJtolZg== +"@webassemblyjs/helper-wasm-section@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.0.tgz#9ce2cc89300262509c801b4af113d1ca25c1a75b" + integrity sha512-3Eb88hcbfY/FCukrg6i3EH8H2UsD7x8Vy47iVJrP967A9JGqgBVL9aH71SETPx1JrGsOUVLo0c7vMCN22ytJew== dependencies: - "@webassemblyjs/ast" "1.9.1" + "@webassemblyjs/ast" "1.11.0" + "@webassemblyjs/helper-buffer" "1.11.0" + "@webassemblyjs/helper-wasm-bytecode" "1.11.0" + "@webassemblyjs/wasm-gen" "1.11.0" -"@webassemblyjs/helper-wasm-bytecode@1.9.1": - version "1.9.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.1.tgz#563f59bcf409ccf469edde168b9426961ffbf6df" - integrity sha512-i2rGTBqFUcSXxyjt2K4vm/3kkHwyzG6o427iCjcIKjOqpWH8SEem+xe82jUk1iydJO250/CvE5o7hzNAMZf0dQ== - -"@webassemblyjs/helper-wasm-section@1.9.1": - version "1.9.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.1.tgz#f7988f94c12b01b99a16120cb01dc099b00e4798" - integrity sha512-FetqzjtXZr2d57IECK+aId3D0IcGweeM0CbAnJHkYJkcRTHP+YcMb7Wmc0j21h5UWBpwYGb9dSkK/93SRCTrGg== - dependencies: - "@webassemblyjs/ast" "1.9.1" - "@webassemblyjs/helper-buffer" "1.9.1" - "@webassemblyjs/helper-wasm-bytecode" "1.9.1" - "@webassemblyjs/wasm-gen" "1.9.1" - -"@webassemblyjs/ieee754@1.9.1": - version "1.9.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.9.1.tgz#3b715871ca7d75784717cf9ceca9d7b81374b8af" - integrity sha512-EvTG9M78zP1MmkBpUjGQHZc26DzPGZSLIPxYHCjQsBMo60Qy2W34qf8z0exRDtxBbRIoiKa5dFyWer/7r1aaSQ== +"@webassemblyjs/ieee754@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.0.tgz#46975d583f9828f5d094ac210e219441c4e6f5cf" + integrity sha512-KXzOqpcYQwAfeQ6WbF6HXo+0udBNmw0iXDmEK5sFlmQdmND+tr773Ti8/5T/M6Tl/413ArSJErATd8In3B+WBA== dependencies: "@xtuc/ieee754" "^1.2.0" -"@webassemblyjs/leb128@1.9.1": - version "1.9.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.9.1.tgz#b2ecaa39f9e8277cc9c707c1ca8b2aa7b27d0b72" - integrity sha512-Oc04ub0vFfLnF+2/+ki3AE+anmW4sv9uNBqb+79fgTaPv6xJsOT0dhphNfL3FrME84CbX/D1T9XT8tjFo0IIiw== +"@webassemblyjs/leb128@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.0.tgz#f7353de1df38aa201cba9fb88b43f41f75ff403b" + integrity sha512-aqbsHa1mSQAbeeNcl38un6qVY++hh8OpCOzxhixSYgbRfNWcxJNJQwe2rezK9XEcssJbbWIkblaJRwGMS9zp+g== dependencies: "@xtuc/long" "4.2.2" -"@webassemblyjs/utf8@1.9.1": - version "1.9.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.9.1.tgz#d02d9daab85cda3211e43caf31dca74c260a73b0" - integrity sha512-llkYtppagjCodFjo0alWOUhAkfOiQPQDIc5oA6C9sFAXz7vC9QhZf/f8ijQIX+A9ToM3c9Pq85X0EX7nx9gVhg== +"@webassemblyjs/utf8@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.0.tgz#86e48f959cf49e0e5091f069a709b862f5a2cadf" + integrity sha512-A/lclGxH6SpSLSyFowMzO/+aDEPU4hvEiooCMXQPcQFPPJaYcPQNKGOCLUySJsYJ4trbpr+Fs08n4jelkVTGVw== -"@webassemblyjs/wasm-edit@1.9.1": - version "1.9.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.1.tgz#e27a6bdbf78e5c72fa812a2fc3cbaad7c3e37578" - integrity sha512-S2IaD6+x9B2Xi8BCT0eGsrXXd8UxAh2LVJpg1ZMtHXnrDcsTtIX2bDjHi40Hio6Lc62dWHmKdvksI+MClCYbbw== +"@webassemblyjs/wasm-edit@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.0.tgz#ee4a5c9f677046a210542ae63897094c2027cb78" + integrity sha512-JHQ0damXy0G6J9ucyKVXO2j08JVJ2ntkdJlq1UTiUrIgfGMmA7Ik5VdC/L8hBK46kVJgujkBIoMtT8yVr+yVOQ== dependencies: - "@webassemblyjs/ast" "1.9.1" - "@webassemblyjs/helper-buffer" "1.9.1" - "@webassemblyjs/helper-wasm-bytecode" "1.9.1" - "@webassemblyjs/helper-wasm-section" "1.9.1" - "@webassemblyjs/wasm-gen" "1.9.1" - "@webassemblyjs/wasm-opt" "1.9.1" - "@webassemblyjs/wasm-parser" "1.9.1" - "@webassemblyjs/wast-printer" "1.9.1" + "@webassemblyjs/ast" "1.11.0" + "@webassemblyjs/helper-buffer" "1.11.0" + "@webassemblyjs/helper-wasm-bytecode" "1.11.0" + "@webassemblyjs/helper-wasm-section" "1.11.0" + "@webassemblyjs/wasm-gen" "1.11.0" + "@webassemblyjs/wasm-opt" "1.11.0" + "@webassemblyjs/wasm-parser" "1.11.0" + "@webassemblyjs/wast-printer" "1.11.0" -"@webassemblyjs/wasm-gen@1.9.1": - version "1.9.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.1.tgz#56a0787d1fa7994fdc7bea59004e5bec7189c5fc" - integrity sha512-bqWI0S4lBQsEN5FTZ35vYzfKUJvtjNnBobB1agCALH30xNk1LToZ7Z8eiaR/Z5iVECTlBndoRQV3F6mbEqE/fg== +"@webassemblyjs/wasm-gen@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.0.tgz#3cdb35e70082d42a35166988dda64f24ceb97abe" + integrity sha512-BEUv1aj0WptCZ9kIS30th5ILASUnAPEvE3tVMTrItnZRT9tXCLW2LEXT8ezLw59rqPP9klh9LPmpU+WmRQmCPQ== dependencies: - "@webassemblyjs/ast" "1.9.1" - "@webassemblyjs/helper-wasm-bytecode" "1.9.1" - "@webassemblyjs/ieee754" "1.9.1" - "@webassemblyjs/leb128" "1.9.1" - "@webassemblyjs/utf8" "1.9.1" + "@webassemblyjs/ast" "1.11.0" + "@webassemblyjs/helper-wasm-bytecode" "1.11.0" + "@webassemblyjs/ieee754" "1.11.0" + "@webassemblyjs/leb128" "1.11.0" + "@webassemblyjs/utf8" "1.11.0" -"@webassemblyjs/wasm-opt@1.9.1": - version "1.9.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.1.tgz#fbdf8943a825e6dcc4cd69c3e092289fa4aec96c" - integrity sha512-gSf7I7YWVXZ5c6XqTEqkZjVs8K1kc1k57vsB6KBQscSagDNbAdxt6MwuJoMjsE1yWY1tsuL+pga268A6u+Fdkg== +"@webassemblyjs/wasm-opt@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.0.tgz#1638ae188137f4bb031f568a413cd24d32f92978" + integrity sha512-tHUSP5F4ywyh3hZ0+fDQuWxKx3mJiPeFufg+9gwTpYp324mPCQgnuVKwzLTZVqj0duRDovnPaZqDwoyhIO8kYg== dependencies: - "@webassemblyjs/ast" "1.9.1" - "@webassemblyjs/helper-buffer" "1.9.1" - "@webassemblyjs/wasm-gen" "1.9.1" - "@webassemblyjs/wasm-parser" "1.9.1" + "@webassemblyjs/ast" "1.11.0" + "@webassemblyjs/helper-buffer" "1.11.0" + "@webassemblyjs/wasm-gen" "1.11.0" + "@webassemblyjs/wasm-parser" "1.11.0" -"@webassemblyjs/wasm-parser@1.9.1": - version "1.9.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.1.tgz#5e8352a246d3f605312c8e414f7990de55aaedfa" - integrity sha512-ImM4N2T1MEIond0MyE3rXvStVxEmivQrDKf/ggfh5pP6EHu3lL/YTAoSrR7shrbKNPpeKpGesW1LIK/L4kqduw== +"@webassemblyjs/wasm-parser@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.0.tgz#3e680b8830d5b13d1ec86cc42f38f3d4a7700754" + integrity sha512-6L285Sgu9gphrcpDXINvm0M9BskznnzJTE7gYkjDbxET28shDqp27wpruyx3C2S/dvEwiigBwLA1cz7lNUi0kw== dependencies: - "@webassemblyjs/ast" "1.9.1" - "@webassemblyjs/helper-api-error" "1.9.1" - "@webassemblyjs/helper-wasm-bytecode" "1.9.1" - "@webassemblyjs/ieee754" "1.9.1" - "@webassemblyjs/leb128" "1.9.1" - "@webassemblyjs/utf8" "1.9.1" + "@webassemblyjs/ast" "1.11.0" + "@webassemblyjs/helper-api-error" "1.11.0" + "@webassemblyjs/helper-wasm-bytecode" "1.11.0" + "@webassemblyjs/ieee754" "1.11.0" + "@webassemblyjs/leb128" "1.11.0" + "@webassemblyjs/utf8" "1.11.0" -"@webassemblyjs/wast-parser@1.9.1": - version "1.9.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.9.1.tgz#e25ef13585c060073c1db0d6bd94340fdeee7596" - integrity sha512-2xVxejXSvj3ls/o2TR/zI6p28qsGupjHhnHL6URULQRcXmryn3w7G83jQMcT7PHqUfyle65fZtWLukfdLdE7qw== +"@webassemblyjs/wast-printer@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.0.tgz#680d1f6a5365d6d401974a8e949e05474e1fab7e" + integrity sha512-Fg5OX46pRdTgB7rKIUojkh9vXaVN6sGYCnEiJN1GYkb0RPwShZXp6KTDqmoMdQPKhcroOXh3fEzmkWmCYaKYhQ== dependencies: - "@webassemblyjs/ast" "1.9.1" - "@webassemblyjs/floating-point-hex-parser" "1.9.1" - "@webassemblyjs/helper-api-error" "1.9.1" - "@webassemblyjs/helper-code-frame" "1.9.1" - "@webassemblyjs/helper-fsm" "1.9.1" - "@xtuc/long" "4.2.2" - -"@webassemblyjs/wast-printer@1.9.1": - version "1.9.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.9.1.tgz#b9f38e93652037d4f3f9c91584635af4191ed7c1" - integrity sha512-tDV8V15wm7mmbAH6XvQRU1X+oPGmeOzYsd6h7hlRLz6QpV4Ec/KKxM8OpLtFmQPLCreGxTp+HuxtH4pRIZyL9w== - dependencies: - "@webassemblyjs/ast" "1.9.1" - "@webassemblyjs/wast-parser" "1.9.1" + "@webassemblyjs/ast" "1.11.0" "@xtuc/long" "4.2.2" "@webpack-cli/info@^1.2.1": @@ -1416,6 +1392,11 @@ argparse@^1.0.10, argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + arr-diff@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" @@ -2790,13 +2771,13 @@ end-of-stream@^1.1.0: dependencies: once "^1.4.0" -enhanced-resolve@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.3.1.tgz#3f988d0d7775bdc2d96ede321dc81f8249492f57" - integrity sha512-G1XD3MRGrGfNcf6Hg0LVZG7GIKcYkbfHa5QMxt1HDUTdYoXH0JR1xXyg+MaKLF73E9A27uWNVxvFivNRYeUB6w== +enhanced-resolve@^5.7.0: + version "5.7.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.7.0.tgz#525c5d856680fbd5052de453ac83e32049958b5c" + integrity sha512-6njwt/NsZFUKhM6j9U8hzVyD4E4r0x7NQzhTCbcWOJ0IQjNSAoalWmb0AE51Wn+fwan5qVESWi7t2ToBxs9vrw== dependencies: graceful-fs "^4.2.4" - tapable "^2.0.0" + tapable "^2.2.0" enquirer@^2.3.6: version "2.3.6" @@ -2844,6 +2825,11 @@ es-abstract@^1.12.0, es-abstract@^1.5.1: string.prototype.trimleft "^2.1.0" string.prototype.trimright "^2.1.0" +es-module-lexer@^0.3.26: + version "0.3.26" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.3.26.tgz#7b507044e97d5b03b01d4392c74ffeb9c177a83b" + integrity sha512-Va0Q/xqtrss45hWzP8CZJwzGSZJjDM5/MJRE3IXXnUCcVLElR9BRaE9F62BopysASyc4nM3uwhSW7FFB9nlWAA== + es-to-primitive@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377" @@ -4328,10 +4314,10 @@ isurl@^1.0.0-alpha5: has-to-string-tag-x "^1.2.0" is-object "^1.0.1" -jest-worker@^26.6.1: - version "26.6.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.1.tgz#c2ae8cde6802cc14056043f997469ec170d9c32a" - integrity sha512-R5IE3qSGz+QynJx8y+ICEkdI2OJ3RJjRQVEyCcFAd3yVhQSEtquziPO29Mlzgn07LOVE8u8jhJ1FqcwegiXWOw== +jest-worker@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" + integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ== dependencies: "@types/node" "*" merge-stream "^2.0.0" @@ -4355,7 +4341,14 @@ js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" -js-yaml@3.14.1, js-yaml@^3.13.1, js-yaml@^3.8.1: +js-yaml@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.0.0.tgz#f426bc0ff4b4051926cd588c71113183409a121f" + integrity sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q== + dependencies: + argparse "^2.0.1" + +js-yaml@^3.13.1, js-yaml@^3.8.1: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== @@ -4499,10 +4492,10 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" -loader-runner@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.1.0.tgz#f70bc0c29edbabdf2043e7ee73ccc3fe1c96b42d" - integrity sha512-oR4lB4WvwFoC70ocraKhn5nkKSs23t57h9udUgw8o0iH8hMXeEoRuUgfcvgUwAJ1ZpRqBvcou4N2SMvM1DwMrA== +loader-runner@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.2.0.tgz#d7022380d66d14c5fb1d496b89864ebcfd478384" + integrity sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw== loader-utils@1.2.3: version "1.2.3" @@ -5307,6 +5300,13 @@ p-limit@^3.0.2: dependencies: p-try "^2.0.0" +p-limit@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + p-locate@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" @@ -6968,10 +6968,10 @@ tapable@^1.0.0: resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== -tapable@^2.0.0, tapable@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.1.1.tgz#b01cc1902d42a7bb30514e320ce21c456f72fd3f" - integrity sha512-Wib1S8m2wdpLbmQz0RBEVosIyvb/ykfKXf3ZIDqvWoMg/zTNm6G/tDSuUM61J1kNCDXWJrLHGSFeMhAG+gAGpQ== +tapable@^2.1.1, tapable@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.0.tgz#5c373d281d9c672848213d0e037d1c4165ab426b" + integrity sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw== tar-stream@^1.5.2: version "1.6.2" @@ -7018,22 +7018,22 @@ tempfile@^2.0.0: temp-dir "^1.0.0" uuid "^3.0.1" -terser-webpack-plugin@^5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.0.3.tgz#ec60542db2421f45735c719d2e17dabfbb2e3e42" - integrity sha512-zFdGk8Lh9ZJGPxxPE6jwysOlATWB8GMW8HcfGULWA/nPal+3VdATflQvSBSLQJRCmYZnfFJl6vkRTiwJGNgPiQ== +terser-webpack-plugin@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.1.1.tgz#7effadee06f7ecfa093dbbd3e9ab23f5f3ed8673" + integrity sha512-5XNNXZiR8YO6X6KhSGXfY0QrGrCRlSwAEjIIrlRQR4W8nP69TaJUlh3bkuac6zzgspiGPfKEHcY295MMVExl5Q== dependencies: - jest-worker "^26.6.1" - p-limit "^3.0.2" + jest-worker "^26.6.2" + p-limit "^3.1.0" schema-utils "^3.0.0" serialize-javascript "^5.0.1" source-map "^0.6.1" - terser "^5.3.8" + terser "^5.5.1" -terser@^5.3.8: - version "5.3.8" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.3.8.tgz#991ae8ba21a3d990579b54aa9af11586197a75dd" - integrity sha512-zVotuHoIfnYjtlurOouTazciEfL7V38QMAOhGqpXDEg6yT13cF4+fEP9b0rrCEQTn+tT46uxgFsTZzhygk+CzQ== +terser@^5.5.1: + version "5.5.1" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.5.1.tgz#540caa25139d6f496fdea056e414284886fb2289" + integrity sha512-6VGWZNVP2KTUcltUQJ25TtNjx/XgdDsBDKGt8nN0MpydU36LmbPPcMBd2kmtZNNGVVDLg44k7GKeHHj+4zPIBQ== dependencies: commander "^2.20.0" source-map "~0.7.2" @@ -7416,33 +7416,33 @@ webpack-sources@^2.1.1: source-list-map "^2.0.1" source-map "^0.6.1" -webpack@5.11.1: - version "5.11.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.11.1.tgz#39b2b9daeb5c6c620e03b7556ec674eaed4016b4" - integrity sha512-tNUIdAmYJv+nupRs/U/gqmADm6fgrf5xE+rSlSsf2PgsGO7j2WG7ccU6AWNlOJlHFl+HnmXlBmHIkiLf+XA9mQ== +webpack@5.15.0: + version "5.15.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.15.0.tgz#63d7b6228a4e15ee8c89899c2cfdd993e809bdd2" + integrity sha512-y/xG+ONDz78yn3VvP6gAvGr1/gkxOgitvHSXBmquyN8KDtrGEyE3K9WkXOPB7QmfcOBCpO4ELXwNcCYQnEmexA== dependencies: "@types/eslint-scope" "^3.7.0" "@types/estree" "^0.0.45" - "@webassemblyjs/ast" "1.9.1" - "@webassemblyjs/helper-module-context" "1.9.1" - "@webassemblyjs/wasm-edit" "1.9.1" - "@webassemblyjs/wasm-parser" "1.9.1" + "@webassemblyjs/ast" "1.11.0" + "@webassemblyjs/wasm-edit" "1.11.0" + "@webassemblyjs/wasm-parser" "1.11.0" acorn "^8.0.4" browserslist "^4.14.5" chrome-trace-event "^1.0.2" - enhanced-resolve "^5.3.1" + enhanced-resolve "^5.7.0" + es-module-lexer "^0.3.26" eslint-scope "^5.1.1" events "^3.2.0" glob-to-regexp "^0.4.1" graceful-fs "^4.2.4" json-parse-better-errors "^1.0.2" - loader-runner "^4.1.0" + loader-runner "^4.2.0" mime-types "^2.1.27" neo-async "^2.6.2" pkg-dir "^5.0.0" schema-utils "^3.0.0" tapable "^2.1.1" - terser-webpack-plugin "^5.0.3" + terser-webpack-plugin "^5.1.1" watchpack "^2.0.0" webpack-sources "^2.1.1" @@ -7592,3 +7592,8 @@ yauzl@^2.4.2: dependencies: buffer-crc32 "~0.2.3" fd-slicer "~1.1.0" + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/yarn.lock b/yarn.lock index 590b51a24..c95d0500d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@angular/compiler@11.0.7": - version "11.0.7" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-11.0.7.tgz#994251520cb4b810240e8081dddb4baddae7551c" - integrity sha512-U+aGn6lP3iB184D2Z+OSK5vCwNtxtsF59T7nNJBMCCwcN7Qc5tfDBbSj1GI11XrIiuuoOxXbAp9BKS0dAyNCWw== +"@angular/compiler@11.0.9": + version "11.0.9" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-11.0.9.tgz#524757eac7c9915605c3579f12b2a80cb9d4d783" + integrity sha512-H2IfS6ciPWN0kmKhbwDuvS8ry5GcRFKfoyA/HGk+nQwCE2nAHC8VNwldbtoisO7XfRWr/uaTrh6z/vdfxsAiHw== dependencies: tslib "^2.0.0" @@ -1036,10 +1036,10 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-typescript/-/dict-typescript-1.0.15.tgz#97cd4357f5715b91178a93b6c1dcab5f6d0591ec" integrity sha512-Guh+nN57OqbcRNH6cfbBQKfeDp0i+GBlniYvhWvaRxkSdFQJi4YgFKvQJsvtwLkwmNqYkQIXQr+8zXhuvTHLhA== -"@eslint/eslintrc@^0.2.2": - version "0.2.2" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.2.2.tgz#d01fc791e2fc33e88a29d6f3dc7e93d0cd784b76" - integrity sha512-EfB5OHNYp1F4px/LI/FEnGylop7nOqkQ1LRzCM0KccA2U8tvV8w01KBv37LbO7nW4H+YhKyo2LcJhRwjjV17QQ== +"@eslint/eslintrc@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.3.0.tgz#d736d6963d7003b6514e6324bec9c602ac340318" + integrity sha512-1JTKgrOKAHVivSvOYw+sJOunkBjUOvjqWk1DPja7ZFhIS2mX/4EgTT8M7eTK9jrKhL/FvXXEbQwIs3pg1xp3dg== dependencies: ajv "^6.12.4" debug "^4.1.1" @@ -1048,7 +1048,7 @@ ignore "^4.0.6" import-fresh "^3.2.1" js-yaml "^3.13.1" - lodash "^4.17.19" + lodash "^4.17.20" minimatch "^3.0.4" strip-json-comments "^3.1.1" @@ -1057,10 +1057,10 @@ resolved "https://registry.yarnpkg.com/@glimmer/env/-/env-0.1.7.tgz#fd2d2b55a9029c6b37a6c935e8c8871ae70dfa07" integrity sha1-/S0rVakCnGs3psk16MiHGucN+gc= -"@glimmer/global-context@0.73.1": - version "0.73.1" - resolved "https://registry.yarnpkg.com/@glimmer/global-context/-/global-context-0.73.1.tgz#34f7ccabd2656c8d4a19581557593b6bac761a4b" - integrity sha512-jilS1HXMf/bzVQETCetlggAFLMYukvOxxGVi5FokL23g3jfWjQncEFf3p3OR17I3HDsEa1FmrZc4iuOp/i2gGQ== +"@glimmer/global-context@0.73.2": + version "0.73.2" + resolved "https://registry.yarnpkg.com/@glimmer/global-context/-/global-context-0.73.2.tgz#34fc51dc5c320f067b912478e077fb3f55ff38f2" + integrity sha512-a/q6E27JMvF5oqKRYG5RFoTH0PrHaLp/Ix6W5OZ1TqvpiiuEgd4Olb55Ehxw2jH+wvmQHQtTxFKDyv0iDJYZ1Q== dependencies: "@glimmer/env" "^0.1.7" @@ -1071,16 +1071,23 @@ dependencies: "@simple-dom/interface" "^1.4.0" -"@glimmer/reference@0.73.1": - version "0.73.1" - resolved "https://registry.yarnpkg.com/@glimmer/reference/-/reference-0.73.1.tgz#5f3634fb780018d2aace753ed512b909d50c85bf" - integrity sha512-0sUebIjfNGuv6XJyC/f0HsFzNQf7/vNgeg+7/qg8NxDrrDfWeLzcaejWkReP/hxAmqLgidHnYju6IqmWciWcFw== +"@glimmer/interfaces@0.73.2": + version "0.73.2" + resolved "https://registry.yarnpkg.com/@glimmer/interfaces/-/interfaces-0.73.2.tgz#03c769208bf705760800f3f64774b074bf04f738" + integrity sha512-SjV0/TtFiv+Sxl3WJ2I5oR6hH+EabTfk3qvllU8WAYBqf6LnNPSMjaFv2Fucn7bIvOqZ8zHl36q6HboAychD/A== + dependencies: + "@simple-dom/interface" "^1.4.0" + +"@glimmer/reference@0.73.2": + version "0.73.2" + resolved "https://registry.yarnpkg.com/@glimmer/reference/-/reference-0.73.2.tgz#85bbf60e5491b93fcc2f4d883fd277ae9f0d5ed0" + integrity sha512-v/arQjBPvMpbVwGuCXCr7rxDteqIhnu91cu2K/7QcqmodzGC7ZhoVKWHtak3A11U1/1/6F2DznK8yHPKC/gEwg== dependencies: "@glimmer/env" "^0.1.7" - "@glimmer/global-context" "0.73.1" - "@glimmer/interfaces" "0.73.1" - "@glimmer/util" "0.73.1" - "@glimmer/validator" "0.73.1" + "@glimmer/global-context" "0.73.2" + "@glimmer/interfaces" "0.73.2" + "@glimmer/util" "0.73.2" + "@glimmer/validator" "0.73.2" "@glimmer/syntax@0.73.1": version "0.73.1" @@ -1101,13 +1108,22 @@ "@glimmer/interfaces" "0.73.1" "@simple-dom/interface" "^1.4.0" -"@glimmer/validator@0.73.1": - version "0.73.1" - resolved "https://registry.yarnpkg.com/@glimmer/validator/-/validator-0.73.1.tgz#8d87e502e84d468bb7d1695fdc85e1cfc3d9de29" - integrity sha512-DGodNSpf1v9Xsu7l7GSitVhNnESVx9qn6RFQ/zVwvptSXaPvLh5RIxsvYqJwkhBsxyPCVqnjz1p+MwqtfJukDA== +"@glimmer/util@0.73.2": + version "0.73.2" + resolved "https://registry.yarnpkg.com/@glimmer/util/-/util-0.73.2.tgz#32ca1cec339a91f12f0359711f1a86fc1dcc13ca" + integrity sha512-ng726SZl/o2NKOLeHdqU9LTH4tP9FW7H1CveZGE8HMTgTDpXA7NCF7TVHqccOMmJNXqspkegtGQFGOLi10HArg== + dependencies: + "@glimmer/env" "0.1.7" + "@glimmer/interfaces" "0.73.2" + "@simple-dom/interface" "^1.4.0" + +"@glimmer/validator@0.73.2": + version "0.73.2" + resolved "https://registry.yarnpkg.com/@glimmer/validator/-/validator-0.73.2.tgz#63bdeecda9904ace565063eedc7916ffb86b2981" + integrity sha512-Bk4xLmZ6tj46yEZzeOqpPla7KHRQP2QiHLo941ieZawc8vP/tZSO0znvuA+SXbqpSjxPPyjMtsXfYiUK7rLfZg== dependencies: "@glimmer/env" "^0.1.7" - "@glimmer/global-context" "0.73.1" + "@glimmer/global-context" "0.73.2" "@handlebars/parser@^2.0.0": version "2.0.0" @@ -1384,10 +1400,10 @@ dependencies: "@rollup/pluginutils" "^3.0.8" -"@rollup/plugin-node-resolve@11.0.1": - version "11.0.1" - resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.0.1.tgz#d3765eec4bccf960801439a999382aed2dca959b" - integrity sha512-ltlsj/4Bhwwhb+Nb5xCz/6vieuEj2/BAkkqVIKmZwC7pIdl8srmgmglE4S0jFlZa32K4qvdQ6NHdmpRKD/LwoQ== +"@rollup/plugin-node-resolve@11.1.0": + version "11.1.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.1.0.tgz#fa0f888297b3aebcd6534e8aba4e6fe01997649a" + integrity sha512-ouBBppRdWJKCllDXGzJ7ZIkYbaq+5TmyP0smt1vdJCFfoZhLi31vhpmjLhyo8lreHf4RoeSNllaWrvSqHpHRog== dependencies: "@rollup/pluginutils" "^3.1.0" "@types/resolve" "1.17.1" @@ -1477,10 +1493,10 @@ resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== -"@types/estree@*", "@types/estree@0.0.45": - version "0.0.45" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.45.tgz#e9387572998e5ecdac221950dab3e8c3b16af884" - integrity sha512-jnqIUKDUqJbDIUxm0Uj7bnlMnRm1T/eZ9N+AVMqhPgzrba2GhGG5o/jCTwmdPK709nEZsGoMzXEDUjcXHa3W0g== +"@types/estree@*", "@types/estree@0.0.46": + version "0.0.46" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.46.tgz#0fb6bfbbeabd7a30880504993369c4bf1deab1fe" + integrity sha512-laIjwTQaD+5DukBZaygQ79K1Z0jb1bPEMRrkXSLjtCcZm+abyp5YbrqpSLzD42FwWW6gK/aS4NYpJ804nG2brg== "@types/estree@0.0.39": version "0.0.39" @@ -1607,10 +1623,10 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.0.1.tgz#1cf72582f764931f085cb8230ff215980fe467b2" integrity sha512-S+gD3fgbkZYW2rnbjugNMqibm9HpEjqZBZkTiI3PwbbNGWmAcxolWIUwZ0SKeG4Dy2ktpKKaI/6+HGYVH8Qrlg== -"@typescript-eslint/types@4.12.0": - version "4.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.12.0.tgz#fb891fe7ccc9ea8b2bbd2780e36da45d0dc055e5" - integrity sha512-N2RhGeheVLGtyy+CxRmxdsniB7sMSCfsnbh8K/+RUIXYYq3Ub5+sukRCjVE80QerrUBvuEvs4fDhz5AW/pcL6g== +"@typescript-eslint/types@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.14.0.tgz#d8a8202d9b58831d6fd9cee2ba12f8a5a5dd44b6" + integrity sha512-VsQE4VvpldHrTFuVPY1ZnHn/Txw6cZGjL48e+iBxTi2ksa9DmebKjAeFmTVAYoSkTk7gjA7UqJ7pIsyifTsI4A== "@typescript-eslint/typescript-estree@4.0.1": version "4.0.1" @@ -1626,13 +1642,13 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/typescript-estree@4.12.0": - version "4.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.12.0.tgz#3963418c850f564bdab3882ae23795d115d6d32e" - integrity sha512-gZkFcmmp/CnzqD2RKMich2/FjBTsYopjiwJCroxqHZIY11IIoN0l5lKqcgoAPKHt33H2mAkSfvzj8i44Jm7F4w== +"@typescript-eslint/typescript-estree@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.14.0.tgz#4bcd67486e9acafc3d0c982b23a9ab8ac8911ed7" + integrity sha512-wRjZ5qLao+bvS2F7pX4qi2oLcOONIB+ru8RGBieDptq/SudYwshveORwCVU4/yMAd4GK7Fsf8Uq1tjV838erag== dependencies: - "@typescript-eslint/types" "4.12.0" - "@typescript-eslint/visitor-keys" "4.12.0" + "@typescript-eslint/types" "4.14.0" + "@typescript-eslint/visitor-keys" "4.14.0" debug "^4.1.1" globby "^11.0.1" is-glob "^4.0.1" @@ -1648,12 +1664,12 @@ "@typescript-eslint/types" "4.0.1" eslint-visitor-keys "^2.0.0" -"@typescript-eslint/visitor-keys@4.12.0": - version "4.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.12.0.tgz#a470a79be6958075fa91c725371a83baf428a67a" - integrity sha512-hVpsLARbDh4B9TKYz5cLbcdMIOAoBYgFPCSP9FFS/liSF+b33gVNq8JHY3QGhHNVz85hObvL7BEYLlgx553WCw== +"@typescript-eslint/visitor-keys@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.14.0.tgz#b1090d9d2955b044b2ea2904a22496849acbdf54" + integrity sha512-MeHHzUyRI50DuiPgV9+LxcM52FCJFYjJiWHtXlbyC27b80mfOwKeiKI+MHOTEpcpfmoPFm/vvQS88bYIx6PZTA== dependencies: - "@typescript-eslint/types" "4.12.0" + "@typescript-eslint/types" "4.14.0" eslint-visitor-keys "^2.0.0" abab@^2.0.3: @@ -2843,10 +2859,10 @@ eslint-ast-utils@^1.1.0: lodash.get "^4.4.2" lodash.zip "^4.2.0" -eslint-config-prettier@7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-7.1.0.tgz#5402eb559aa94b894effd6bddfa0b1ca051c858f" - integrity sha512-9sm5/PxaFG7qNJvJzTROMM1Bk1ozXVTKI0buKOyb0Bsr1hrwi0H/TzxF/COtf1uxikIK8SwhX7K6zg78jAzbeA== +eslint-config-prettier@7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-7.2.0.tgz#f4a4bd2832e810e8cc7c1411ec85b3e85c0c53f9" + integrity sha512-rV4Qu0C3nfJKPOAhFujFxB7RMP+URFyQqqOZW9DMRD7ZDTFyjaIlETU3xzHELt++4ugC0+Jm084HQYkkJe+Ivg== eslint-formatter-friendly@7.0.0: version "7.0.0" @@ -2922,17 +2938,17 @@ eslint-plugin-react@7.22.0: resolve "^1.18.1" string.prototype.matchall "^4.0.2" -eslint-plugin-unicorn@25.0.1: - version "25.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-25.0.1.tgz#bedcbc9b817042a44f6501584e8266741120f023" - integrity sha512-MEyEWoyou/qhJH6rEER9YHACtCsQT+eewc6Fdxbi2eiTvsGrBR8JZMA6qaeof3oMQeRxOpaERoBKzU7R5c4A/w== +eslint-plugin-unicorn@26.0.1: + version "26.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-26.0.1.tgz#65f476bb7624beb417066259dc14c7ebb21eb6fc" + integrity sha512-SWgF9sIVY74zqkkSN2dclSCqRfocWSUGD0haC0NX2oRfmdp9p8dQvJYkYSQePaCyssPUE/pqpsIEEZNTh8crUA== dependencies: ci-info "^2.0.0" clean-regexp "^1.0.0" eslint-ast-utils "^1.1.0" - eslint-template-visitor "^2.2.1" + eslint-template-visitor "^2.2.2" eslint-utils "^2.1.0" - import-modules "^2.0.0" + import-modules "^2.1.0" lodash "^4.17.20" pluralize "^8.0.0" read-pkg-up "^7.0.1" @@ -2949,13 +2965,13 @@ eslint-scope@^5.0.0, eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-template-visitor@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/eslint-template-visitor/-/eslint-template-visitor-2.2.1.tgz#2dccb1ab28fa7429e56ba6dd0144def2d89bc2d6" - integrity sha512-q3SxoBXz0XjPGkUpwGVAwIwIPIxzCAJX1uwfVc8tW3v7u/zS7WXNH3I2Mu2MDz2NgSITAyKLRaQFPHu/iyKxDQ== +eslint-template-visitor@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/eslint-template-visitor/-/eslint-template-visitor-2.2.2.tgz#46cd2b06eca5c1d97369aadd96e131df88fdd59c" + integrity sha512-SkcLjzKw3JjKTWHacRDeLBa2gxb600zbCKTkXj/V97QnZ9yxkknoPL8vc8PFueqbFXP7mYNTQzjCjcMpTRdRaA== dependencies: babel-eslint "^10.1.0" - eslint-visitor-keys "^1.3.0" + eslint-visitor-keys "^2.0.0" esquery "^1.3.1" multimap "^1.1.0" @@ -2976,13 +2992,13 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== -eslint@7.17.0: - version "7.17.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.17.0.tgz#4ccda5bf12572ad3bf760e6f195886f50569adb0" - integrity sha512-zJk08MiBgwuGoxes5sSQhOtibZ75pz0J35XTRlZOk9xMffhpA9BTbQZxoXZzOl5zMbleShbGwtw+1kGferfFwQ== +eslint@7.18.0: + version "7.18.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.18.0.tgz#7fdcd2f3715a41fe6295a16234bd69aed2c75e67" + integrity sha512-fbgTiE8BfUJZuBeq2Yi7J3RB3WGUQ9PNuNbmgi6jt9Iv8qrkxfy19Ds3OpL1Pm7zg3BtTVhvcUZbIRQ0wmSjAQ== dependencies: "@babel/code-frame" "^7.0.0" - "@eslint/eslintrc" "^0.2.2" + "@eslint/eslintrc" "^0.3.0" ajv "^6.10.0" chalk "^4.0.0" cross-spawn "^7.0.2" @@ -3006,7 +3022,7 @@ eslint@7.17.0: js-yaml "^3.13.1" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" - lodash "^4.17.19" + lodash "^4.17.20" minimatch "^3.0.4" natural-compare "^1.4.0" optionator "^0.9.1" @@ -3689,10 +3705,10 @@ import-local@^3.0.2: pkg-dir "^4.2.0" resolve-cwd "^3.0.0" -import-modules@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/import-modules/-/import-modules-2.0.0.tgz#9c1e13b4e7a15682f70a6e3fa29534e4540cfc5d" - integrity sha512-iczM/v9drffdNnABOKwj0f9G3cFDon99VcG1mxeBsdqnbd+vnQ5c2uAiCHNQITqFTOPaEvwg3VjoWCur0uHLEw== +import-modules@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/import-modules/-/import-modules-2.1.0.tgz#abe7df297cb6c1f19b57246eb8b8bd9664b6d8c2" + integrity sha512-8HEWcnkbGpovH9yInoisxaSoIg9Brbul+Ju3Kqe2UsYDUBJD/iQjSgEj0zPcTDPKfPp2fs5xlv1i+JSye/m1/A== imurmurhash@^0.1.4: version "0.1.4" @@ -4627,16 +4643,7 @@ jest-watcher@^26.6.2: jest-util "^26.6.2" string-length "^4.0.1" -jest-worker@^26.1.0, jest-worker@^26.2.1: - version "26.5.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.5.0.tgz#87deee86dbbc5f98d9919e0dadf2c40e3152fa30" - integrity sha512-kTw66Dn4ZX7WpjZ7T/SUDgRhapFRKWmisVAF0Rv4Fu8SLFD7eLbqpLvbxVqYhSgaWa7I+bW7pHnbyfNsH6stug== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^7.0.0" - -jest-worker@^26.6.2: +jest-worker@^26.1.0, jest-worker@^26.2.1, jest-worker@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ== @@ -5014,10 +5021,10 @@ merge2@^1.3.0: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -meriyah@3.1.6: - version "3.1.6" - resolved "https://registry.yarnpkg.com/meriyah/-/meriyah-3.1.6.tgz#56c9c0edb63f9640c7609a39a413c60b038e4451" - integrity sha512-JDOSi6DIItDc33U5N52UdV6P8v+gn+fqZKfbAfHzdWApRQyQWdcvxPvAr9t01bI2rBxGvSrKRQSCg3SkZC1qeg== +meriyah@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/meriyah/-/meriyah-4.0.0.tgz#8aebc64f09a9ec16a3040b754b85f7131770c4a1" + integrity sha512-FJ3WMKlHJTKH6tazLOTw16bnTWV8vfAy08K3hR+6PnOJpciWaxMDZdA0PhGyWZyHbtiNdfQOc2+Tm8bEt/1TTA== micromatch@^3.1.4: version "3.1.10" @@ -6091,10 +6098,10 @@ rollup-pluginutils@^2.3.1: dependencies: estree-walker "^0.6.1" -rollup@2.36.1: - version "2.36.1" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.36.1.tgz#2174f0c25c7b400d57b05628d0e732c7ae8d2178" - integrity sha512-eAfqho8dyzuVvrGqpR0ITgEdq0zG2QJeWYh+HeuTbpcaXk8vNFc48B7bJa1xYosTCKx0CuW+447oQOW8HgBIZQ== +rollup@2.37.1: + version "2.37.1" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.37.1.tgz#aa7aadffd75c80393f9314f9857e851b0ffd34e7" + integrity sha512-V3ojEeyGeSdrMSuhP3diBb06P+qV4gKQeanbDv+Qh/BZbhdZ7kHV0xAt8Yjk4GFshq/WjO7R4c7DFM20AwTFVQ== optionalDependencies: fsevents "~2.1.2" @@ -6629,9 +6636,9 @@ terminal-link@^2.0.0: supports-hyperlinks "^2.0.0" terser@^5.0.0: - version "5.3.4" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.3.4.tgz#e510e05f86e0bd87f01835c3238839193f77a60c" - integrity sha512-dxuB8KQo8Gt6OVOeLg/rxfcxdNZI/V1G6ze1czFUzPeCFWZRtvZMgSzlZZ5OYBZ4HoG607F6pFPNLekJyV+yVw== + version "5.5.1" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.5.1.tgz#540caa25139d6f496fdea056e414284886fb2289" + integrity sha512-6VGWZNVP2KTUcltUQJ25TtNjx/XgdDsBDKGt8nN0MpydU36LmbPPcMBd2kmtZNNGVVDLg44k7GKeHHj+4zPIBQ== dependencies: commander "^2.20.0" source-map "~0.7.2"